Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

anyOf does not work #116

Open
NyxCode opened this issue Jun 5, 2022 · 0 comments
Open

anyOf does not work #116

NyxCode opened this issue Jun 5, 2022 · 0 comments

Comments

@NyxCode
Copy link

NyxCode commented Jun 5, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant