Skip to content

Display type(s) when using allOf #10432

Open
@GniLudio

Description

@GniLudio

When using just $ref the referenced schema is displayed.

first:
  $ref: '#/components/schemas/SomeType'

Image

But when using allOf the original schemas aren't displayed any more.

second:
  allOf:
    - $ref: '#/components/schemas/SomeType'
third:
  allOf:
    - $ref: '#/components/schemas/SomeType'
    - $ref: '#/components/schemas/SomeOtherType'

Image

Content & configuration

Swagger/OpenAPI definition:

openapi: 3.0.0
info:
 title: Testing
 version: 1.0.0
paths:
 '/':
   get:
     responses:
       200:
         description: OK
         content:
           application/json:
             schema:
               $ref: '#/components/schemas/MyObject'

components:
 schemas:
   SomeType:
     type: string
   SomeOtherType:
     type: string
   MyObject:
     type: object
     properties:
       first:
         $ref: '#/components/schemas/SomeType'
       second:
         allOf:
           - $ref: '#/components/schemas/SomeType'
       third:
         allOf:
           - $ref: '#/components/schemas/SomeType'
           - $ref: '#/components/schemas/SomeOtherType'
         

Describe the solution you'd like

It would be nice if the schema is also displayed when using allOf.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions