github.com/rzurga/go-swagger@v0.28.1-0.20211109195225-5d1f453ffa3a/fixtures/enhancements/1623/swagger.yml (about)

     1  ---
     2  swagger: "2.0"
     3  info:
     4    version: 0.0.0
     5    title: Breaking API as described by christianklotz
     6  paths:
     7    /stores:
     8      get:
     9        operationId: getFoo
    10        responses:
    11          200:
    12            description: "ok"
    13            schema:
    14              type: array
    15              items:
    16                $ref: "#/definitions/Foo"
    17  definitions:
    18    Foo:
    19      type: object
    20      properties:
    21        arrayHasOmitEmptyTrue:
    22          type: array
    23          x-omitempty: true
    24          items:
    25            type: string
    26            enum:
    27              - some
    28              - values
    29        arrayHasOmitEmptyFalse:
    30          type: array
    31          x-omitempty: false
    32          items:
    33            type: string
    34            enum:
    35              - some
    36              - values
    37        arrayNoOmitEmpty:
    38          type: array
    39          items:
    40            type: string
    41            enum:
    42              - some
    43              - values
    44        generalHasOmitEmptyTrue:
    45          type: string
    46          x-omitempty: true
    47        generalHasOmitEmptyFalse:
    48          type: string
    49          x-omitempty: false
    50        generalNoOmitEmpty:
    51          type: string
    52        refHasOmitEmptyTrue: # <- discarded ($ref siblings are ignored, however, true is the default)
    53          x-omitempty: true
    54          $ref: "#/definitions/bar"
    55        refHasOmitEmptyFalse:  # <- discarded ($ref siblings are ignored)
    56          x-omitempty: false
    57          $ref: "#/definitions/bar"
    58        refNoOmitEmpty:
    59          $ref: "#/definitions/bar"
    60        intHasJsonString:
    61          type: integer
    62          format: int64
    63          x-go-json-string: true
    64        boolHasJsonString:
    65          type: boolean
    66          x-go-json-string: true
    67    bar:
    68      type: object
    69      x-nullable: false
    70      properties:
    71        prop:
    72          type: string