openapi: 3.0.1
info:
  version: 1.0.0
  title: Example
  license:
    name: MIT
servers:
  - url: http://api.example.xyz/v1
paths:
  /resolve_parameter_inline_enum:
    get:
      parameters:
        - name: status_inline_enum
          in: query
          description: Status values that need to be considered for filter
          required: true
          style: form
          explode: false
          deprecated: true
          schema:
            type: array
            items:
              type: string
              enum:
                - available
                - pending
                - sold
              default: available
      operationId: resolveParameterInlineEnum
      responses:
        '200':
          description: OK
  /resolve_parameter_inline_enum_form_parameters:
    post:
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                enum_form_string_array:
                  description: Form parameter enum test (string array)
                  type: array
                  items:
                    type: string
                    default: $
                    enum:
                      - '>'
                      - $
                enum_form_string:
                  description: Form parameter enum test (string)
                  type: string
                  enum:
                    - _abc
                    - '-efg'
                    - (xyz)
                  default: '-efg'
      operationId: resolve_parameter_inline_enum_form_parameters
      responses:
        '200':
          description: OK
  /resolve_request_body_invalid_ref:
    post:
      requestBody:
        $ref: '#/components/schemas/Invalid'
      operationId: resolveRequestBodyInvalidRef
      responses:
        '200':
          description: OK
  /resolve_inline_request_body:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                address:
                  type: object
                  properties:
                    street:
                      type: string
      operationId: resolveInlineRequestBody
      responses:
        '200':
          description: OK
  /resolve_inline_request_body_with_required:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
        required: true
      operationId: resolveInlineRequestBodyWithRequired
      responses:
        '200':
          description: OK
  /resolve_inline_request_body_with_title:
    post:
      requestBody:
        content:
          application/json:
            schema:
              title: resolve_inline_request_body_with_title
              type: object
              properties:
                name:
                  type: string
      operationId: resolveInlineRequestBodyWithRequired
      responses:
        '200':
          description: OK
  /resolve_inline_request_body_with_title_in_chinese:
    post:
      requestBody:
        content:
          application/json:
            schema:
              title: 服務條款和私隱政策
              type: object
              properties:
                just_property:
                  type: string
      operationId: resolveInlineRequestBodyWithRequired
      responses:
        '200':
          description: OK
  /non_model_request_body:
    post:
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: string
              format: binary
      operationId: nonModelRequestBody
      responses:
        '200':
          description: OK
  /resolve_inline_array_request_body:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: object
                properties:
                  street:
                    type: string
                  city:
                    type: string
      operationId: resolveInlineArrayRequestBody
      responses:
        '200':
          description: OK
  /resolve_inline_array_request_body_with_title:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                title: resolveInlineArrayRequestBodyWithTitleItems
                type: object
                properties:
                  street_2:
                    type: string
                  city_2:
                    type: string
      operationId: resolveInlineArrayRequestBodyWithTitle
      responses:
        '200':
          description: OK
  /resolve_inline_array_response:
    get:
      operationId: resolveInlineArrayResponse
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    array_response_property:
                      type: string
  /resolve_inline_array_response_with_title:
    get:
      operationId: resolveInlineArrayResponseWithTitle
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  title: resolveInlineArrayResponseWithTitleItems
                  type: object
                  properties:
                    array_response_with_title_property:
                      type: string
  /resolve_inline_object_response_with_additional_properties:
    get:
      operationId: resolveInlineObjectResponseWithAdditionalProperties
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
                  properties:
                    resolve_inline_object_response_with_additional_properties:
                      type: string
  /resolve_inline_map_schema_in_response:
    get:
      operationId: resolveInlineMapSchemaInResponse
      responses:
        '200':
          description: OK
          # Swagger parser doesn't use MapSchema currently,
          # so we need to set a MapSchema instance as the schema manually for testing.
          # see InlineModelResolverTest#resolveInlineMapSchemaInResponse()
  /resolve_inline_request_body_allof:
    post:
      requestBody:
        content:
          application/json:
            schema:
              allOf:
              - type: object
                properties:
                  name:
                    type: string
                  address:
                    type: object
                    properties:
                      street:
                        type: string
      operationId: resolveInlineRequestBodyAllOf
      responses:
        '200':
          description: OK
  /arbitrary_object_request_body:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
      operationId: arbitraryObjectRequestBody
      responses:
        '200':
          description: OK
  /arbitrary_object_request_body_property:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                arbitrary_object_request_body_property:
                  type: object
      operationId: arbitraryObjectRequestBodyProperty
      responses:
        '200':
          description: OK
  /arbitrary_request_body_array:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: item
              items:
                type: object
      operationId: arbitraryRequestBodyArray
      responses:
        '200':
          description: OK
  /arbitrary_request_body_array_property:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: item
              items:
                type: object
                properties:
                  arbitrary_request_body_array_property:
                    type: object
      operationId: arbitraryRequestBodyArrayProperty
      responses:
        '200':
          description: OK
  /arbitrary_object_response:
    get:
      operationId: arbitraryObjectResponse
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
  /meta:
    get:
      operationId: meta
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  id:
                    type: integer
  /mega:
    get:
      operationId: mega
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  id:
                    type: integer

  /arbitrary_object_response_array:
    get:
      operationId: arbitraryObjectResponseArray
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
  /arbitrary_object_response_array_inline:
    get:
      operationId: arbitraryObjectResponseArrayInline
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    arbitrary_object_response_array_inline:
                      type: object
  /arbitrary_object_response_with_additional_property:
    get:
      operationId: arbitraryObjectResponseWithAdditionalProperty
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  type: object
  /empty_example_on_string_models:
    get:
      operationId: emptyExampleOnStringTypeModels
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/EmptyExampleOnStringTypeModels'
  /nullable_properties:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                nullable_request_body_property:
                  type: object
                  nullable: true
                  properties:
                    nullable_request_body_property_name:
                      type: string
      operationId: arbitraryObjectRequestBodyProperty
      responses:
        '200':
          description: OK
  /callback:
    post:
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                callbackUri:
                  type: string
      responses:
        201:
          headers:
            Location:
              description: Contains the URI of the newly created resource
              schema:
                type: string
      callbacks:
        webhook:
          '{$request.body#/callbackUri}':
            post:
              operationId: webhookNotify
              requestBody:
                content:
                  application/json:
                    schema:
                      type: object
                      properties:
                        notificationId:
                          type: string
                        action:
                          type: string
                        data:
                          type: string
components:
  requestBodies: {}
  schemas:
    Users:
      type: array
      items:
        title: User
        type: object
        properties:
          street:
            type: string
          city:
            type: string
    ComposedObjectModelInline:
      allOf:
      - type: object
        properties:
          composed_object_model_inline_allOf:
            type: object
            properties:
              prop1:
                type: string
      anyOf:
      - type: object
        properties:
          composed_object_model_inline_anyOf:
            type: object
            properties:
              prop1:
                type: string
      oneOf:
      - type: object
        properties:
          composed_object_model_inline_oneOf:
            type: object
            properties:
              prop1:
                type: string
    ArbitraryObjectModelInline:
      type: object
      properties:
        arbitrary_object_model_inline:
          type: object
    ArbitraryObjectModelWithArrayInlineWithoutTitle:
      type: array
      items:
        type: object
        properties:
          arbitrary_object_model_with_array_inline_without_title:
            type: object
    ArbitraryObjectModelWithArrayInlineWithTitle:
      type: array
      items:
        title: ArbitraryObjectModelWithArrayInlineWithTitleInner
        type: object
        properties:
          arbitrary_object_model_with_array_inline_with_title_property:
            type: object
    EmptyExampleOnStringTypeModels:
      type: string
      example: ''
    InlinePropertyIsNullable:
      type: object
      properties:
        nullable_property:
          type: object
          nullable: true
          properties:
            nullable_property_name:
              type: string
