paths:
  post:
    tags:
    - register
    summary: "Register a new namespace"
    parameters:
    - $ref: "#/components/parameters/namespace"
    - $ref: "#/components/parameters/public"
    requestBody:
      description: "A url-form-encoded password for the namespace"
      content:
        application/x-www-form-urlencoded:
          schema:
            type: object
            properties:
              password:
                type: string
    responses:
      200:
        $ref: "#/components/schemas/ok"

components:
  parameters:
    namespace:
      $ref: "./swagger.yaml#/components/parameters/namespace"

    public:
      name: public
      in: query
      description: "if not empty, then namespace is accessible without auth"
      schema:
        type: string

  schemas:
    ok:
      $ref: "./swagger.yaml#/components/schemas/ok"
