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

     1  swagger: "2.0"
     2  info:
     3    title: ""
     4    version: ""
     5  paths:
     6    /:
     7      get:
     8        description: ""
     9        responses:
    10          200:
    11            description: ""
    12  definitions:
    13    Case-1--Fail--omitempty-false-not-hoisted-by-ref:
    14      type: object
    15      properties:
    16        Body:
    17          $ref: '#/definitions/Object-with-omitempty-false'
    18  
    19    Case-2--Fail--omitempty-false-not-overridden-by-ref-sibling:
    20      type: object
    21      properties:
    22        Body:
    23          $ref: '#/definitions/Object-with-omitempty-true'
    24          x-omitempty: false
    25  
    26    Case-3--Pass--object-nullable-false-hoisted-by-ref:
    27      type: object
    28      properties:
    29        Body:
    30          $ref: '#/definitions/Object-with-nullable-false'
    31  
    32    Case-4--Pass--object-nullable-false-overriden-by-ref-sibling:
    33      type: object
    34      properties:
    35        Body:
    36          $ref: '#/definitions/Object-with-nullable-true'
    37          x-nullable: false
    38  
    39    Object-with-omitempty-true:
    40      type: object
    41      properties:
    42        Data:
    43          type: object
    44  
    45    Object-with-omitempty-false:
    46      type: object
    47      properties:
    48        Data:
    49          type: object
    50      x-omitempty: false
    51  
    52    Object-with-nullable-true:
    53      type: object
    54      properties:
    55        Data:
    56          type: object
    57      x-nullable: true
    58  
    59    Object-with-nullable-false:
    60      type: object
    61      properties:
    62        Data:
    63          type: object
    64      x-nullable: false
    65  
    66    arrayWithNullable:
    67      type: array
    68      items:
    69        type: string
    70      x-nullable: true
    71  
    72    arrayWithNullableItems:
    73      type: array
    74      items:
    75        type: string
    76        x-nullable: true
    77  
    78    arrayWithDefault:
    79      type: array
    80      items:
    81        type: string
    82  
    83    arrayWithOmitEmpty:
    84      type: array
    85      items:
    86        type: string
    87      x-omitempty: true
    88  
    89    arrayWithNoOmitEmpty:
    90      type: array
    91      items:
    92        type: string
    93      x-omitempty: false
    94  
    95    arrayWithOmitEmptyItems:
    96      type: array
    97      items:
    98        type: string
    99        x-omitempty: false
   100  
   101    objectWithArrays:
   102      type: object
   103      properties:
   104        array0: # <- expect property to be omit empty
   105          $ref: '#/definitions/arrayWithDefault'
   106        array1: # <- expect property to be no omit empty
   107          type: array
   108          items:
   109            type: string
   110          x-omitempty: false
   111        array11: # <- expect property to be omit empty
   112          type: array
   113          items:
   114            type: string
   115          x-omitempty: true
   116        array12: # <- expect property to be no omit empty
   117          type: array
   118          items:
   119            type: string
   120        array2: # <- expect property to be omit empty
   121          $ref: '#/definitions/arrayWithOmitEmpty'
   122        array3: # <- expect property to be no omit empty
   123          $ref: '#/definitions/arrayWithNoOmitEmpty'