Skip to content

Hard to read nested anyOf/oneOf blocks #1110

@grochlitz-evertz

Description

@grochlitz-evertz

With using schema-style="table" I have an excerpt from my openapi file:

components:
  schemas:
      ExampleSchemaA:
        oneOf:
          - $ref: '#/components/schemas/Blahblah'
          - $ref: '#/components/schemas/Blahblah2'

      ExampleSchemaB:
        ... (some normal definition not using oneOf) ....

  requestBodies:
      ExampleRequestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  properties:
                    type:
                      type: string
                    attributes:
                      description: The attributes of the asset being registered
                      anyOf:
                        - $ref: '#/components/schemas/ExampleSchemaA'
                        - $ref: '#/components/schemas/ExampleSchemaB'
                  required:
                    - type
                    - attributes

This ends up rendering something like this:

Image

If the default tree schema style is used, it renders as I would expect:

Image

Thank you for taking the time to read! Let me know if you need some more information from my side

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