Skip to content

anyOf does not work #116

@NyxCode

Description

@NyxCode

In my spec, I am using anyOf:

schemas:
  ...
  SuperType:
    type: object
    anyOf:
      - $ref: "#/components/schemas/SubType1"
      - $ref: "#/components/schemas/SubType2"
    discriminator:
      propertyName: type
      mapping:
        subType1: "#/components/schemas/SubType1"
        subType2: "#/components/schemas/SubType2"

This is just rendered as an empty JSON object ({}).
I tried to get around this by manually specifying examples, but they don't seem to work yet for request bodies.
Is there any workaround for this? Would appreciate some advice since this is a blocking issue for me right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions