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
paths:
  /foo:
    get:
      tags:
        - pet
      responses:
        "200":
          description: response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Foo'
        "404":
          description: not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestServiceError'
        "422":
          description: validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestServiceError'
components:
  schemas:
    Foo:
      type: string
      default: foo
    # RFC7807 Problem Detail
    RestServiceError:
      properties:
        type:
          description: " A URI reference that identifies the problem type"
          type: string
        title:
          description: "A short, human-readable summary of the problem type."
          type: string
        status:
          description: "The HTTP Status Code"
          type: integer
        detail:
          description: "A human-readable explanation specific to this occurrence of the problem."
          type: string
        instance:
          description: "A unique URI that identifies the specific occurrence of the problem."
          type: string
