...

Text file src/github.com/go-openapi/analysis/fixtures/bugs/1602/fixture-1602-5.yaml

Documentation: github.com/go-openapi/analysis/fixtures/bugs/1602

     1---
     2swagger: "2.0"
     3schemes:
     4  - "http"
     5  - "https"
     6basePath: "/v1.24"
     7info:
     8  title: "derived from Pouch Engine API"
     9  version: "1.24"
    10  description: A variation on issue go-swagger/go-swagger#1609
    11paths:
    12  /_pung:
    13    get:
    14      parameters:
    15      - name: foulerBodyRef
    16        in: body
    17        schema: # <-- foul $ref
    18          $ref: '#/parameters/nobodyWithRef'
    19      responses:
    20        200:
    21          description: "no error"
    22          schema:
    23            type: "string"
    24            example: "OK"
    25        401:
    26          $ref: "#/responses/401ErrorResponse"
    27        404:
    28          $ref: "#/responses/404ErrorResponse"
    29        500:
    30          $ref: "#/responses/500ErrorResponse"
    31        501:
    32          $ref: "#/responses/foulResponse"
    33
    34definitions:
    35  Error:
    36    type: "object"
    37    properties:
    38      message:
    39        type: string
    40
    41parameters:
    42  bodyWithRef:
    43    name: bodyWithRefParam
    44    in: body
    45    schema:
    46      $ref: "#/definitions/Error"
    47  nobodyWithRef:
    48    name: bodyWithRefParam
    49    in: query
    50    type: integer
    51    #required: true
    52  anotherBodyWithRef:
    53    name: anotherBodyWithRefParam
    54    in: body
    55    schema:
    56      $ref: "#/definitions/Error"
    57  funnyParam:
    58    name: funnyParam
    59    in: body
    60    schema:
    61      $ref: "#/responses/500ErrorResponse/schema"
    62
    63responses:
    64  401ErrorResponse:
    65    description: An unexpected 401 error occurred.
    66    schema:
    67      $ref: "#/definitions/Error"
    68  404ErrorResponse:
    69    description: An unexpected 404 error occurred.
    70    schema:
    71      $ref: "#/definitions/Error"
    72  500ErrorResponse:
    73    description: An unexpected server error occurred.
    74    schema:
    75      $ref: "#/definitions/Error"
    76  funnyResponse:
    77    description: An unexpected server error occurred.
    78    schema:
    79      $ref: "#/responses/401ErrorResponse/schema"
    80  foulResponse:
    81    description: An unexpected server error occurred.
    82    schema:
    83      $ref: "#/responses/noSchemaResponse"
    84  noSchemaResponse:
    85    description: An unexpected server error occurred.

View as plain text