RapiPdf icon indicating copy to clipboard operation
RapiPdf copied to clipboard

anyOf does not work

Open NyxCode opened this issue 3 years ago • 0 comments

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.

NyxCode avatar Jun 05 '22 17:06 NyxCode