github.com/kaisawind/go-swagger@v0.19.0/fixtures/bugs/1487/fixture-844-variations.yaml (about)

     1  ---
     2    swagger: "2.0"
     3    info: 
     4      title: "allOf bugs with empty objects"
     5      version: "0.0.1"
     6      description: "repro"
     7      license: 
     8        name: "Apache 2.0"
     9        url: "http://www.apache.org/licenses/LICENSE-2.0.html"
    10    definitions: 
    11      foo: 
    12        type: "object"
    13      bar: 
    14        type: "object"
    15      nonInterface:
    16        type: "object"
    17        additionalProperties:
    18          type: string
    19          format: date
    20      # this one is generated as interface{} and validation is not honored
    21      emptyEnum:
    22        type: "object"
    23        enum: 
    24          - "abc"
    25          - "def"
    26      variation0:
    27        allOf: 
    28          - 
    29            $ref: "#/definitions/foo"
    30          - 
    31            $ref: "#/definitions/bar"
    32      variation1:
    33        allOf: 
    34          - 
    35            $ref: "#/definitions/foo"
    36          - 
    37            $ref: "#/definitions/nonInterface"
    38      variation2:
    39        type: "object"
    40        properties:
    41          prop1:
    42            $ref: '#/definitions/emptyEnum'
    43      variation3:
    44        type: "object"
    45        properties:
    46          prop1:
    47            type: array
    48            minItems: 10
    49            items: 
    50              $ref: '#/definitions/emptyEnum'
    51      tupleVariation:
    52        type: "array"
    53        items: 
    54          - type: integer
    55            maximum: 10 
    56          - $ref: '#/definitions/bar'
    57          - $ref: '#/definitions/nonInterface'
    58          - type: array 
    59            maxItems: 10
    60            items: 
    61              $ref: '#/definitions/bar'
    62        additionalItems:
    63          $ref: '#/definitions/foo'
    64      addItemsVariation:
    65        type: "array"
    66        items: 
    67          - type: integer
    68            maximum: 10 
    69          - $ref: '#/definitions/bar'
    70        additionalItems:
    71          type: array 
    72          uniqueItems: true
    73          items:
    74            $ref: '#/definitions/foo'
    75    paths: 
    76      /: 
    77        get: 
    78          responses: 
    79            200: 
    80              description: "OK"
    81              schema: 
    82                allOf: 
    83                  - 
    84                    $ref: "#/definitions/foo"
    85                  - 
    86                    $ref: "#/definitions/bar"
    87