swagger: '2.0'
info:
  version: 1.0.0
  title: Swagger Petstore
  license:
    name: MIT
host: petstore.swagger.io
basePath: "/v1"
schemes:
- http
consumes:
- application/json
produces:
- application/json
x-controller: validation
paths:
  "/valid-response":
    get:
      operationId: validResponseExample
      responses:
        '200':
          description: Response
          examples:
            application/json:
            - id: 123
              name: Sparky
              tag: Dog
          schema:
            "$ref": "#/definitions/Pets"
        default:
          description: Error
          schema:
            $ref: '#/definitions/Error'
  "/valid-response-mocked":
    get:
      operationId: validResponseMocked
      responses:
        '200':
          description: Response
          examples:
            application/json:
            - id: 123
              name: Sparky
              tag: Dog
          schema:
            "$ref": "#/definitions/Pets"
        default:
          description: Error
          schema:
            $ref: '#/definitions/Error'
  "/invalid-response":
    get:
      operationId: invalidResponse
      responses:
        '200':
          description: Response
          examples:
            application/json:
            - id: '123'
              name: Sparky
              tag: Dog
          schema:
            "$ref": "#/definitions/Pets"
  "/invalid-response-mocked":
    get:
      x-operation-id: invalidResponseMocked
      responses:
        '200':
          description: Response
          examples:
            application/json:
            - id: '123'
              name: Sparky
              tag: Dog
          schema:
            "$ref": "#/definitions/Pets"
        default:
          description: Error
          schema:
            $ref: '#/definitions/Error'
  "/invalid-response-code":
      get:
        operationId: invalidResponseCode
        responses:
          '200':
            description: Response
            examples:
              application/json:
              - id: 123
                name: Sparky
                tag: Dog
            schema:
              "$ref": "#/definitions/Pets"
  "/default-response":
    get:
      operationId: defaultResponse
      responses:
        '200':
          description: Response
          examples:
            application/json:
            - id: 123
              name: Sparky
              tag: Dog
          schema:
            "$ref": "#/definitions/Pets"
        default:
          description: Error
          schema:
            $ref: '#/definitions/Error'
  "/input-validation":
    post:
      operationId: inputValidation
      parameters:
      - name: body
        in: body
        description: user to add to the system
        required: true
        schema:
          $ref: '#/definitions/Pet'
      - name: mode
        in: query
        enum:
        - one
        - two
        - three
        description: Enum value
        required: false
        type: string
      responses:
        '200':
          description: An paged array of pets
          schema:
            type: string
        default:
          description: Error
          schema:
            $ref: '#/definitions/Error'
definitions:
  Pet:
    required:
    - id
    - name
    properties:
      id:
        type: integer
        format: int64
      name:
        type: string
      tag:
        type: string
  Pets:
    type: array
    items:
      "$ref": "#/definitions/Pet"
  Error:
    required:
    - code
    - message
    properties:
      code:
        type: integer
        format: int32
      message:
        type: string