---
swagger: "2.0"
info:
  version: "0.1.0"
  title: issue#859. Reference validation
paths:
  /:
    post:
      parameters:
        # error
        - $ref: "#/parameters/rateLimit"
        - name: myparam
          in: query
          type: string
      responses:
        200:
          description: "Success"
    get:
      parameters:
        - $ref: "#/parameters/rateLimit"        #  <-- error: mispelled reference cannot resolve
        - name: myparam
          in: query
          schema:
            $ref: '#/definitions/myparam' # <- error : mispelled reference cannot resolve
      responses:
        default:
          description: the record
          schema:
            $ref: "#/definitions/record" # <- error : mispelled reference cannot resolve
        404:
          $ref: "#/responses/notFound"
        200:
          description: "Success"
          schema:
            $ref: "#definitions/myoutput" # <- error : mispelled reference cannot resolve

parameters:
  rateLimits:
    name: X-Rate-Limit
    in: header
    type: integer
    format: int32

responses:
  notFound:
    description: Not found
    schema:
      $ref: "#/definitions/record"  # <- error : mispelled reference cannot resolve

definitions:
  records:
    type: object
    properties:
      createdAt:
        type: string
        format: date-time
  myparams:
    type: string
  myoutputs:
    type: string
