openapi: 3.0.1
info:
  description: API under test
  title: My title
  version: 1.0.7
servers:
- url: /
paths:
  /xml:
    post:
      description: ""
      requestBody:
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/xml_array'
      responses:
        "201":
          description: OK
        "400":
          description: Bad Request
      summary: Post an array
    put:
      requestBody:
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/xml_object'
      responses:
        "201":
          description: OK
        "400":
          description: Bad Request
  /paramget:
    get:
      parameters:
      - description: The stuff to get
        explode: false
        in: query
        name: uuid
        required: false
        schema:
          $ref: '#/components/schemas/UuidObject'
        style: form
      - description: Some object to pass as query parameter
        explode: false
        in: query
        name: someObject
        required: false
        schema:
          $ref: '#/components/schemas/ObjectParam'
        style: form
      - description: Some list to pass as query parameter
        explode: false
        in: query
        name: someList
        required: false
        schema:
          $ref: '#/components/schemas/MyIDList'
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: JSON rsp
      summary: Get some stuff with parameters.
  /multiget:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: JSON rsp
        "201":
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/_multiget_get_201_response'
          description: XML rsp
        "202":
          content:
            application/octet-stream:
              schema:
                format: binary
                type: string
          description: octet rsp
        "203":
          content:
            text/plain:
              schema:
                type: string
          description: string rsp
        "204":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: Duplicate Response long text. One.
        "205":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: Duplicate Response long text. Two.
        "206":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: Duplicate Response long text. Three.
      summary: Get some stuff.
  /xml_other:
    post:
      requestBody:
        content:
          text/xml:
            schema:
              $ref: '#/components/schemas/anotherXmlObject'
      responses:
        "201":
          content:
            text/xml:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: OK
        "400":
          description: Bad Request
    put:
      requestBody:
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/anotherXmlArray'
      responses:
        "201":
          description: OK
        "400":
          description: Bad Request
  /xml_extra:
    post:
      requestBody:
        content:
          application/xml:
            schema:
              $ref: '#/components/schemas/duplicate_xml_object'
      responses:
        "201":
          description: OK
        "400":
          description: Bad Request
  /uuid:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UuidObject'
          description: Duplicate Response long text. One.
  /required_octet_stream:
    put:
      requestBody:
        content:
          application/octet-stream:
            schema:
              format: byte
              type: string
        required: true
      responses:
        "200":
          description: OK
  /readonly_auth_scheme:
    get:
      responses:
        "200":
          description: Check that limiting to a single required auth scheme works
      security:
      - authScheme:
        - test.read
  /multiple_auth_scheme:
    get:
      responses:
        "200":
          description: Check that limiting to multiple required auth schemes works
      security:
      - authScheme:
        - test.read
        - test.write
  /untyped_property:
    get:
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectUntypedProps'
      responses:
        "200":
          description: Check that untyped properties works
  /responses_with_headers:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                type: String
          description: Success
          headers:
            Success-Info:
              explode: false
              required: true
              schema:
                type: String
              style: simple
            Bool-Header:
              explode: false
              schema:
                type: bool
              style: simple
            Object-Header:
              explode: false
              schema:
                $ref: '#/components/schemas/ObjectHeader'
              style: simple
        "412":
          description: Precondition Failed
          headers:
            Further-Info:
              explode: false
              schema:
                type: String
              style: simple
            Failure-Info:
              explode: false
              schema:
                type: String
              style: simple
  /mandatory-request-header:
    get:
      parameters:
      - explode: false
        in: header
        name: X-Header
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          description: Success
  /register-callback:
    post:
      callbacks:
        callback:
          '{$request.query.url}/callback':
            post:
              operationId: callback_CallbackPost
              responses:
                "204":
                  description: OK
              x-callback-request: true
      parameters:
      - explode: true
        in: query
        name: url
        required: true
        schema:
          format: uri
          type: string
        style: form
      responses:
        "204":
          description: OK
  /callback-with-header:
    post:
      callbacks:
        callback:
          '{$request.query.url}/callback-with-header':
            post:
              operationId: callback_CallbackWithHeaderPost
              parameters:
              - explode: false
                in: header
                name: Information
                required: false
                schema:
                  type: string
                style: simple
              responses:
                "204":
                  description: OK
              x-callback-request: true
      parameters:
      - explode: true
        in: query
        name: url
        required: true
        schema:
          format: uri
          type: string
        style: form
      responses:
        "204":
          description: OK
  /rfc7807:
    get:
      responses:
        "204":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectWithArrayOfObjects'
          description: OK
        "404":
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ObjectWithArrayOfObjects'
          description: NotFound
        "406":
          content:
            application/problem+xml:
              schema:
                $ref: '#/components/schemas/ObjectWithArrayOfObjects'
          description: NotAcceptable
  /merge-patch-json:
    get:
      responses:
        "200":
          content:
            application/merge-patch+json:
              schema:
                $ref: '#/components/schemas/anotherXmlObject'
          description: merge-patch+json-encoded response
  /enum_in_path/{path_param}:
    get:
      parameters:
      - explode: false
        in: path
        name: path_param
        required: true
        schema:
          $ref: '#/components/schemas/StringEnum'
        style: simple
      responses:
        "200":
          description: Success
  /override-server:
    get:
      responses:
        "204":
          description: Success.
      servers:
      - url: /override
  /complex-query-param:
    get:
      parameters:
      - explode: true
        in: query
        name: list-of-strings
        required: false
        schema:
          items:
            $ref: '#/components/schemas/StringObject'
          type: array
        style: form
      responses:
        "200":
          description: Success
  /repos/{repoId}:
    get:
      operationId: GetRepoInfo
      parameters:
      - explode: false
        in: path
        name: repoId
        required: true
        schema:
          type: string
        style: simple
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StringObject'
          description: OK
      tags:
      - repo
      - Info
  /repos:
    post:
      operationId: CreateRepo
      requestBody:
        content:
          application/json:
            example:
              requiredParam: true
            schema:
              $ref: '#/components/schemas/ObjectParam'
        required: true
      responses:
        "200":
          description: Success
      tags:
      - Repo
  /one-of:
    get:
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_one_of_get_200_response'
          description: Success
  /any-of:
    get:
      parameters:
      - description: list of any of objects
        explode: true
        in: query
        name: any-of
        required: false
        schema:
          items:
            $ref: '#/components/schemas/AnyOfObject'
          minItems: 1
          type: array
        style: form
      responses:
        "200":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AnyOfObject'
          description: Success
        "201":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/12345AnyOfObject'
          description: AlternateSuccess
        "202":
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/_any_of_get_202_response'
          description: AnyOfSuccess
  /json-complex-query-param:
    get:
      parameters:
      - content:
          application/json:
            schema:
              items:
                $ref: '#/components/schemas/StringObject'
              type: array
        in: query
        name: list-of-strings
        required: false
      responses:
        "200":
          description: Success
components:
  schemas:
    AnyOfProperty:
      description: Test containing an anyOf object
      properties:
        requiredAnyOf:
          $ref: '#/components/schemas/AnyOfObject'
        optionalAnyOf:
          $ref: '#/components/schemas/12345AnyOfObject'
      required:
      - requiredAnyOf
    AnyOfObject:
      anyOf:
      - enum:
        - FOO
        - BAR
        type: string
      - description: Alternate option
        type: string
      description: Test a model containing an anyOf
    "12345AnyOfObject":
      anyOf:
      - enum:
        - FOO
        - BAR
        - '*'
        type: string
      - description: Alternate option
        type: string
      description: Test a model containing an anyOf that starts with a number
    EnumWithStarObject:
      description: Test a model containing a special character in the enum
      enum:
      - FOO
      - BAR
      - '*'
      type: string
    UuidObject:
      description: Test a model containing a UUID
      format: uuid
      type: string
    xml_array:
      items:
        $ref: '#/components/schemas/xml_inner'
      type: array
      xml:
        name: CamelXmlArray
        wrapped: true
    xml_inner:
      type: string
      xml:
        name: camelXmlInner
    xml_object:
      description: An XML object
      properties:
        innerString:
          type: string
        other_inner_rename:
          type: integer
      title: an XML object
      type: object
      xml:
        name: camelXmlObject
        namespace: http://foo.bar
    duplicate_xml_object:
      description: An XML object
      properties:
        inner_string:
          type: string
        inner_array:
          $ref: '#/components/schemas/xml_array'
      required:
      - inner_array
      type: object
      xml:
        name: camelDuplicateXmlObject
        namespace: http://different.bar
    anotherXmlArray:
      items:
        $ref: '#/components/schemas/anotherXmlInner'
      type: array
      xml:
        name: snake_another_xml_array
        wrapped: true
    anotherXmlInner:
      type: string
      xml:
        name: snake_another_xml_inner
    anotherXmlObject:
      description: An XML object
      example:
        inner_string: inner_string
      properties:
        inner_string:
          type: string
      type: object
      xml:
        name: snake_another_xml_object
        namespace: http://foo.bar
    ObjectWithArrayOfObjects:
      example:
        objectArray:
        - null
        - null
      properties:
        objectArray:
          items:
            $ref: '#/components/schemas/StringObject'
          type: array
      type: object
    StringObject:
      type: string
    MyIDList:
      items:
        $ref: '#/components/schemas/MyID'
      type: array
    MyID:
      type: integer
    ObjectUntypedProps:
      example:
        not_required_untyped_nullable: ""
        required_untyped: ""
        required_untyped_nullable: ""
        not_required_untyped: ""
      properties:
        required_untyped:
          nullable: false
        required_untyped_nullable:
          nullable: true
        not_required_untyped:
          nullable: false
        not_required_untyped_nullable:
          nullable: false
      required:
      - required_untyped
      - required_untyped_nullable
      type: object
    ObjectParam:
      example:
        requiredParam: true
        optionalParam: 0
      properties:
        requiredParam:
          type: boolean
        optionalParam:
          type: integer
      required:
      - requiredParam
      type: object
    ObjectHeader:
      properties:
        requiredObjectHeader:
          type: boolean
        optionalObjectHeader:
          type: integer
      required:
      - requiredObjectHeader
      type: object
    RequiredObjectHeader:
      type: boolean
    OptionalObjectHeader:
      type: integer
    AdditionalPropertiesWithList:
      additionalProperties:
        items:
          type: string
        type: array
      maxProperties: 1
      type: object
    NullableTest:
      properties:
        nullable:
          nullable: true
          type: string
        nullableWithNullDefault:
          nullable: true
          type: string
        nullableWithPresentDefault:
          default: default
          nullable: true
          type: string
        nullableWithNoDefault:
          nullable: true
          type: string
        nullableArray:
          items:
            type: string
          nullable: true
          type: array
      required:
      - nullable
      type: object
    StringEnum:
      enum:
      - FOO
      - BAR
      type: string
    Ok:
      type: string
    Error:
      type: string
    Err:
      type: string
    Result:
      type: string
    _multiget_get_201_response:
      properties:
        foo:
          type: string
      type: object
    _one_of_get_200_response:
      oneOf:
      - type: integer
      - items:
          type: string
        type: array
    _any_of_get_202_response:
      anyOf:
      - $ref: '#/components/schemas/StringObject'
      - $ref: '#/components/schemas/UuidObject'
  securitySchemes:
    authScheme:
      flows:
        authorizationCode:
          authorizationUrl: http://example.org
          scopes:
            test.read: Allowed to read state.
            test.write: Allowed to change state.
          tokenUrl: http://example.org
      type: oauth2

