openapi: 3.0.1
info:
  description: This spec is for testing rust-server-specific things
  title: rust-server-test
  version: 2.3.4
servers:
- url: /
paths:
  /dummy:
    get:
      operationId: dummyGet
      responses:
        "200":
          content: {}
          description: Success
      summary: A dummy endpoint to make the spec valid.
    put:
      operationId: dummyPut
      requestBody:
        content:
          '*/*':
            schema:
              $ref: '#/components/schemas/dummyPut_request'
        required: true
      responses:
        "200":
          content: {}
          description: Success
      x-codegen-request-body-name: nested_response
  /html:
    post:
      operationId: htmlPost
      requestBody:
        content:
          text/html:
            schema:
              type: string
        required: true
      responses:
        "200":
          content:
            text/html:
              schema:
                type: string
          description: Success
      summary: Test HTML handling
      x-codegen-request-body-name: body
  /file_response:
    get:
      operationId: file_responseGet
      responses:
        "200":
          content:
            application/json:
              schema:
                format: binary
                type: string
          description: Success
      summary: Get a file
  /raw_json:
    get:
      operationId: raw_jsonGet
      responses:
        "200":
          content:
            '*/*':
              schema:
                type: object
          description: Success
      summary: Get an arbitrary JSON blob.
  /solo-object:
    post:
      operationId: solo_objectPost
      requestBody:
        content:
          application/json:
            schema:
              type: object
        required: true
      responses:
        "204":
          content: {}
          description: OK
      summary: Send an arbitrary JSON blob
      x-codegen-request-body-name: value
  /post-yaml:
    post:
      description: Test sending an arbitrary unsupported format - e.g. YAML
      operationId: post_yaml
      requestBody:
        content:
          application/yaml:
            schema:
              type: string
        description: The YAML body to test
        required: true
      responses:
        "204":
          content: {}
          description: OK
      x-codegen-request-body-name: value
  /get-structured-yaml:
    get:
      description: Test returning arbitrary structured YAML
      operationId: getStructuredYaml
      responses:
        "200":
          content:
            application/yaml:
              schema:
                $ref: '#/components/schemas/get_yaml_response'
          description: OK
  /allOf:
    get:
      description: Test getting an object which uses allOf
      operationId: AllOf_Get
      responses:
        "200":
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/allOfObject'
          description: OK
components:
  requestBodies:
    nested_response:
      content:
        '*/*':
          schema:
            properties:
              id:
                type: string
              password:
                type: string
            required:
            - id
            type: object
      required: true
  schemas:
    additionalPropertiesObject:
      additionalProperties:
        type: string
      description: An additionalPropertiesObject
      example: foo
      type: object
    allOfObject:
      allOf:
      - $ref: '#/components/schemas/baseAllOf'
      example:
        sampleProperty: sampleProperty
      properties:
        sampleProperty:
          type: string
    baseAllOf:
      properties:
        sampleBaseProperty:
          type: string
      type: object
    aNullableContainer:
      properties:
        NullableThing:
          nullable: true
          type: string
        RequiredNullableThing:
          nullable: true
          type: string
      required:
      - RequiredNullableThing
      type: object
    ObjectOfObjects:
      description: An object of objects
      properties:
        inner:
          $ref: '#/components/schemas/ObjectOfObjects_inner'
      type: object
    get_yaml_response:
      description: structured response
      properties:
        value:
          description: Inner string
          type: string
      type: object
    dummyPut_request:
      properties:
        id:
          type: string
        password:
          type: string
      required:
      - id
      type: object
    ObjectOfObjects_inner:
      properties:
        required_thing:
          type: string
        optional_thing:
          type: integer
      required:
      - required_thing
      type: object
x-original-swagger-version: "2.0"

