github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/enhancements/1572/fixture-1572.yaml (about)

     1  swagger: "2.0"
     2  info: 
     3    title: "edge cases for operations schemas"
     4    version: "0.0.1"
     5    description: |
     6        Run the following test caes and exercise the minimal flatten mode:
     7          - [x] nil schema in body param / response
     8          - [x] interface{} in body param /response
     9          - [x] additional schema reused from model (body param and response) (with maps or arrays)
    10          - [x] primitive body / response
    11          - [x] $ref'ed response and param (check that minimal flatten expands it)
    12          - [] x-go-name in inline operation schema (body param and response)
    13  
    14    license: 
    15      name: "Apache 2.0"
    16      url: "http://www.apache.org/licenses/LICENSE-2.0.html"
    17  
    18  parameters:
    19    ref1:
    20      name: nullBody
    21      in: body
    22      required: true
    23      # null schema: invalid spec
    24      # empty schema
    25      #schema: {}
    26  
    27  responses:
    28    resp1:
    29      description: "OK"
    30      schema:
    31        type: object
    32        additionalProperties: true
    33  
    34  definitions: 
    35    modelInterface:
    36      type: object
    37      additionalProperties: true
    38  paths: 
    39    /getNull: 
    40      get:
    41        operationId: getNull
    42        parameters:
    43          - $ref: '#/parameters/ref1'
    44        responses: 
    45          200: 
    46            $ref: '#/responses/resp1'
    47          203: 
    48            description: "OK"
    49            # null schema
    50    /getInterface: 
    51      get: 
    52        operationId: getInterface
    53        parameters:
    54          - name: interfaceBody
    55            in: body
    56            required: true
    57            schema:
    58              type: object
    59              additionalProperties: true
    60        responses: 
    61          200: 
    62            description: "OK"
    63            schema:
    64              type: object
    65              additionalProperties: true
    66    /getModelInterface: 
    67      get: 
    68        operationId: getModelInterface
    69        parameters:
    70          - name: interfaceBody
    71            in: body
    72            required: true
    73            schema:
    74              type: object
    75              additionalProperties:
    76                $ref: '#/definitions/modelInterface'
    77        responses: 
    78          200: 
    79            description: "OK"
    80            schema:
    81              type: array
    82              items:
    83                $ref: '#/definitions/modelInterface'
    84    /getPrimitive: 
    85      get: 
    86        operationId: getPrimitive
    87        parameters:
    88          - name: primitiveBody
    89            in: body
    90            required: true
    91            schema:
    92              type: integer
    93              format: uint32
    94              maximum: 100
    95        responses: 
    96          200: 
    97            description: "OK"
    98            schema:
    99              type: number
   100              format: float
   101              maximum: 100