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

     1  swagger: "2.0"
     2  
     3  info:
     4    title: polymorphic unmarshaller
     5    description: 'reproduces issue 1532'
     6    version: "1.0.0"
     7  
     8  paths:
     9    /mytest:
    10      get:
    11        description: my test
    12        responses:
    13          200:
    14            description: my test
    15  definitions:
    16    Event:
    17      type: object
    18      discriminator: event
    19      properties:
    20        event:
    21          type: "string"
    22          enum:
    23            - update_object
    24            - delete
    25        id:
    26          type: string
    27      required:
    28        - event
    29        - id
    30    update_object:
    31      type: object
    32      allOf:
    33        - $ref: "#/definitions/Event"
    34        - type: object
    35          properties:
    36            data: # <--- This is what produces an issue
    37              $ref: "#/definitions/Object"
    38    Object:
    39      type: object
    40      discriminator: type
    41      properties:
    42        type:
    43          type: string
    44          enum:
    45            - Message
    46            - User
    47      required:
    48        - type