...

Text file src/github.com/go-openapi/analysis/fixtures/bugs/1602/fixture-1602-4.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  /_peng:
    13    get:
    14      parameters:
    15      - name: foulBodyRef
    16        in: body
    17        schema: # <-- foul $ref
    18          $ref: '#/parameters/bodyWithRef'
    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"
    31definitions:
    32  Error:
    33    type: "object"
    34    properties:
    35      message:
    36        type: string
    37
    38parameters:
    39  bodyWithRef:
    40    name: bodyWithRefParam
    41    in: body
    42    schema:
    43      $ref: "#/definitions/Error"
    44  nobodyWithRef:
    45    name: bodyWithRefParam
    46    in: query
    47    type: integer
    48    #required: true
    49  anotherBodyWithRef:
    50    name: anotherBodyWithRefParam
    51    in: body
    52    schema:
    53      $ref: "#/definitions/Error"
    54  funnyParam:
    55    name: funnyParam
    56    in: body
    57    schema:
    58      $ref: "#/responses/500ErrorResponse/schema"
    59
    60responses:
    61  401ErrorResponse:
    62    description: An unexpected 401 error occurred.
    63    schema:
    64      $ref: "#/definitions/Error"
    65  404ErrorResponse:
    66    description: An unexpected 404 error occurred.
    67    schema:
    68      $ref: "#/definitions/Error"
    69  500ErrorResponse:
    70    description: An unexpected server error occurred.
    71    schema:
    72      $ref: "#/definitions/Error"
    73  funnyResponse:
    74    description: An unexpected server error occurred.
    75    schema:
    76      $ref: "#/responses/401ErrorResponse/schema"
    77  foulResponse:
    78    description: An unexpected server error occurred.
    79    schema:
    80      $ref: "#/responses/noSchemaResponse"
    81  noSchemaResponse:
    82    description: An unexpected server error occurred.

View as plain text