cancel
Showing results for 
Search instead for 
Did you mean: 

Swagger UI Composed model bug

Highlighted
Occasional Visitor

Swagger UI Composed model bug

swagger: '2.0'
info:
  description: d
  version: 1.0.0
  title: t
paths:
  /a:
    get:
      responses:
        200:
          description: d
          schema:
            $ref: '#/definitions/ModelB'
definitions:
  ModelA:
    properties:
      prop1:
        type: string
  ModelB:
    allOf:
      - $ref: '#/definitions/ModelA'
      - properties:
          prop2:
            type: string

 

When creating a model that picks up properties from another model, the composed model is my-labelled in the UI. In the attached example, ModelA is shown twice. As per (other bug), the link to the model in the path is also incorrect.

1 REPLY 1
Highlighted
Staff

Re: Swagger UI Composed model bug

Hi p3tecracknell,

 

Thanks for reporting this. We're investigating it and will get back to you asap.

 

It looks like this is also happening on our open-source Swagger editor (editor.swagger.io) so we'll coordinate the work there first.

 

Thanks,

Fernando

New Here?
Join us and watch the welcome video:
Announcements