...

Text file src/github.com/go-openapi/validate/fixtures/validation/fixture-859.yaml

Documentation: github.com/go-openapi/validate/fixtures/validation

     1---
     2swagger: "2.0"
     3info:
     4  version: "0.1.0"
     5  title: issue#859. Reference validation
     6paths:
     7  /:
     8    post:
     9      parameters:
    10        # error
    11        - $ref: "#/parameters/rateLimit"
    12        - name: myparam
    13          in: query
    14          type: string
    15      responses:
    16        200:
    17          description: "Success"
    18    get:
    19      parameters:
    20        - $ref: "#/parameters/rateLimit"        #  <-- error: mispelled reference cannot resolve
    21        - name: myparam
    22          in: query
    23          schema:
    24            $ref: '#/definitions/myparam' # <- error : mispelled reference cannot resolve
    25      responses:
    26        default:
    27          description: the record
    28          schema:
    29            $ref: "#/definitions/record" # <- error : mispelled reference cannot resolve
    30        404:
    31          $ref: "#/responses/notFound"
    32        200:
    33          description: "Success"
    34          schema:
    35            $ref: "#definitions/myoutput" # <- error : mispelled reference cannot resolve
    36
    37parameters:
    38  rateLimits:
    39    name: X-Rate-Limit
    40    in: header
    41    type: integer
    42    format: int32
    43
    44responses:
    45  notFound:
    46    description: Not found
    47    schema:
    48      $ref: "#/definitions/record"  # <- error : mispelled reference cannot resolve
    49
    50definitions:
    51  records:
    52    type: object
    53    properties:
    54      createdAt:
    55        type: string
    56        format: date-time
    57  myparams:
    58    type: string
    59  myoutputs:
    60    type: string

View as plain text