swagger: '2.0'
info:
  title: Test swagger
  description: testing the fastify swagger api
  version: 0.1.0
host: localhost
basePath: /v2
schemes:
  - http
consumes:
  - application/json
produces:
  - application/json
paths:
  '/pathParam/{id}':
    get:
      operationId: getPathParam
      summary: Test path parameters
      parameters:
        - name: id
          in: path
          required: true
          type: integer
      responses:
        '200':
          description: ok
  /queryParam:
    get:
      operationId: getQueryParam
      summary: Test query parameters
      parameters:
        - in: query
          name: int1
          type: integer
        - in: query
          name: int2
          type: integer
      responses:
        '200':
          description: ok
  /headerParam:
    get:
      operationId: getHeaderParam
      summary: Test header parameters
      parameters:
        - in: header
          name: X-Request-ID
          type: string
      responses:
        '200':
          description: ok
  /bodyParam:
    post:
      operationId: postBodyParam
      summary: Test body parameters
      parameters:
        - name: str1
          in: body
          required: true
          schema:
            $ref: '#/definitions/bodyObject'
      responses:
        '200':
          description: ok
  '/noOperationId/{id}':
    get:
      summary: Test missing operationid
      parameters:
        - name: id
          in: path
          required: true
          type: integer
      responses:
        '200':
          description: ok
          schema:
            $ref: '#/definitions/responseObject'
  /responses:
    get:
      operationId: getResponse
      summary: Test response serialization
      parameters:
        - in: query
          name: replyType
          type: string
      responses:
        '200':
          description: ok
          schema:
            $ref: '#/definitions/responseObject'
definitions:
  bodyObject:
    type: object
    properties:
      str1:
        type: string
    required:
      - str1
  responseObject:
    type: object
    properties:
      response:
        type: string
    required:
      - response

