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

     1  swagger: '2.0'
     2  info:
     3    version: '2.0'
     4    contact:
     5      url: 'https://example.org/support'
     6      name: 'Example Support'
     7      email: support@example.org
     8    description: 'Test case inspired by bitbucket API to demonstrate polymorphism with inherited additional properties'
     9    title: 'test case polymorphism with additional props'
    10  paths:
    11    '/repositories/component/{id}':
    12      parameters:
    13        - required: true
    14          type: string
    15          name: id
    16          in: path
    17      get:
    18        responses:
    19          default:
    20            description: 'Unexpected component.'
    21            schema:
    22              $ref: '#/definitions/component'
    23    '/repositories/components':
    24      get:
    25        responses:
    26          default:
    27            description: 'Unexpected component.'
    28            schema:
    29              type: array
    30              items:
    31                $ref: '#/definitions/component'
    32      put:
    33        parameters:
    34          - required: true
    35            in: body
    36            name: components
    37            schema:
    38              type: array
    39              items:
    40                $ref: '#/definitions/component'
    41        responses:
    42          default:
    43            description: 'Unexpected component.'
    44            schema:
    45    '/repositories/object/{id}':
    46      parameters:
    47        - required: true
    48          type: string
    49          name: id
    50          in: path
    51      get:
    52        responses:
    53          default:
    54            description: 'Unexpected object.'
    55            schema:
    56              $ref: '#/definitions/object'
    57  
    58    '/repositories/object':
    59      get:
    60        responses:
    61          default:
    62            description: 'Unexpected object.'
    63            schema:
    64              type: array
    65              items:
    66                $ref: '#/definitions/object'
    67      put:
    68        parameters:
    69          - required: true
    70            in: body
    71            name: components
    72            schema:
    73              type: array
    74              items:
    75                $ref: '#/definitions/object'
    76        responses:
    77          default:
    78            description: 'Unexpected component.'
    79            schema:
    80  schemes:
    81    - https
    82  basePath: /
    83  produces:
    84    - application/json
    85  definitions:
    86    object:
    87      description: 'Base type for most resource objects. It defines the common `type` element that identifies an object''s type. It also identifies the element as Swagger''s `discriminator`.'
    88      required:
    89        - type
    90      additionalProperties: true
    91      discriminator: type
    92      type: object
    93      properties:
    94        type:
    95          type: string
    96    component:
    97      allOf:
    98        -
    99          $ref: '#/definitions/object'
   100        -
   101          additionalProperties: true
   102          type: object
   103          description: 'A component as defined in a repository''s issue tracker.'
   104          properties:
   105            name:
   106              type: string
   107            links:
   108              additionalProperties: false
   109              type: object
   110              properties:
   111                self:
   112                  additionalProperties: false
   113                  type: object
   114                  properties:
   115                    href: {type: string, format: uri}
   116            id:
   117              type: integer