openapi: 3.0.0
info:
  description: >-
    This spec is mainly for testing Petstore server and contains fake endpoints,
    models. Please do not use this for any other purpose. Special characters: "
    \
  version: 1.0.0
  title: OpenAPI Petstore
  license:
    name: Apache-2.0
    url: 'https://www.apache.org/licenses/LICENSE-2.0.html'
tags:
  - name: pet
    description: Everything about your Pets
  - name: store
    description: Access to Petstore orders
  - name: user
    description: Operations about user
paths:
  /foo:
    get:
      responses:
        default:
          description: response
          content:
            application/json:
              schema:
                type: object
                properties:
                  string:
                    $ref: '#/components/schemas/Foo'
servers:
  - url: 'http://{server}.swagger.io:{port}/v2'
    description: petstore server
    variables:
      server:
        enum:
          - 'petstore'
          - 'qa-petstore'
          - 'dev-petstore'
        default: 'petstore'
      port:
        enum:
          - 80
          - 8080
        default: 80
  - url: https://localhost:8080/{version}
    description: The local server
    variables:
      version:
        enum:
          - 'v1'
          - 'v2'
        default: 'v2'
  - url: https://127.0.0.1/no_variable
    description: The local server without variables
components:
  securitySchemes:
    petstore_auth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
          scopes:
            'write:pets': modify pets in your account
            'read:pets': read your pets
    api_key:
      type: apiKey
      name: api_key
      in: header
    api_key_query:
      type: apiKey
      name: api_key_query
      in: query
    http_basic_test:
      type: http
      scheme: basic
    bearer_test:
      type: http
      scheme: bearer
      bearerFormat: JWT
    http_signature_test:
      # Test the 'HTTP signature' security scheme.
      # Each HTTP request is cryptographically signed as specified
      # in https://datatracker.ietf.org/doc/draft-cavage-http-signatures/
      type: http
      scheme: signature
  schemas:
    Foo:
      type: object
      properties:
        bar:
          $ref: '#/components/schemas/Bar'
    format_test:
      type: object
      required:
        - number
        - byte
        - date
        - password
      properties:
        integer:
          type: integer
          maximum: 100
          minimum: 10
          multipleOf: 2
        int32:
          type: integer
          format: int32
          maximum: 200
          minimum: 20
        unsigned_integer:
          type: integer
          format: int32
          maximum: 200
          minimum: 20
          x-unsigned: true
        int64:
          type: integer
          format: int64
        unsigned_long:
          type: integer
          format: int64
          x-unsigned: true
        number:
          maximum: 543.2
          minimum: 32.1
          type: number
          multipleOf: 32.5
        float:
          type: number
          format: float
          maximum: 987.6
          minimum: 54.3
        double:
          type: number
          format: double
          maximum: 123.4
          minimum: 67.8
        decimal:
          type: string
          format: number
        string:
          type: string
          pattern: '/[a-z]/i'
        byte:
          type: string
          format: byte
        binary:
          type: string
          format: binary
        date:
          type: string
          format: date
          example: '2020-02-02'
        dateTime:
          type: string
          format: date-time
          example: '2007-12-03T10:15:30+01:00'
        uuid:
          type: string
          format: uuid
          example: 72f98069-206d-4f12-9f12-3d1e525a8e84
        password:
          type: string
          format: password
          maxLength: 64
          minLength: 10
        pattern_with_digits:
          description: A string that is a 10 digit number. Can have leading zeros.
          type: string
          pattern: '^\d{10}$'
        pattern_with_digits_and_delimiter:
          description: A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.
          type: string
          pattern: '/^image_\d{1,3}$/i'
