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

     1  ---
     2  swagger: "2.0"
     3  info:
     4    version: "1.0"
     5    title: "external types imports"
     6    description: "repro issue 2385"
     7  paths:
     8    /test:
     9      get:
    10        parameters:
    11        - in: body
    12          name: body
    13          schema:
    14            type: array
    15            items:
    16              $ref: "#/definitions/MyType"
    17        responses:
    18          default:
    19            description: xxx
    20            # reference to models package
    21            schema:
    22              $ref: "#/definitions/Zzz"
    23      put:
    24        parameters:
    25        - in: body
    26          name: body
    27          schema:
    28            # inline type generated in operations
    29            type: array
    30            items:
    31              # inline type generated in operations
    32              type: integer
    33              x-go-type:
    34                type: MyInteger
    35        responses:
    36          default:
    37            description: ok
    38            # inline type generated in operations
    39            schema:
    40              type: object
    41              properties:
    42                x:
    43                  type: string
    44              x-go-type:
    45                type: MyString
    46  
    47  definitions:
    48    Zzz:
    49      type: object
    50      properties:
    51        meta:
    52          $ref: '#/definitions/MyType'
    53  
    54    # generated in models package
    55    MyType:
    56      type: object
    57      x-go-type:
    58        type: MyType
    59  
    60    MyArray:
    61      type: array
    62      items:
    63        type: array
    64        maxItems: 12
    65        items:
    66          $ref: '#/definitions/MyType'
    67  
    68    MyMap:
    69      type: object
    70      additionalProperties:
    71        type: array
    72        minItems: 5
    73        items:
    74          type: object
    75          additionalProperties:
    76            $ref: '#/definitions/MyType'