Discussions
Discriminator doesn't seem to be recognized
about 1 year ago by null
Hello, we have the following section in our openapi definition file:
...
requestBody:
required: true
content:
application/json:
schema:
oneOf:
- $ref: "./components/auth.yml#/schemas/UserCredentialRequest"
- $ref: "./components/auth.yml#/schemas/RefreshTokenRequest"
- $ref: "./components/auth.yml#/schemas/AuthorizationCodeRequest"
discriminator:
propertyName: grant_type
mapping:
password: "./components/auth.yml#/schemas/UserCredentialRequest"
refresh_token: "./components/auth.yml#/schemas/RefreshTokenRequest"
authorization_code: "./components/auth.yml#/schemas/AuthorizationCodeRequest"
...
Somehow, the request body is not rendered in the UI, this is what we see:
https://pasteboard.co/toDL5B2pvcA0.png
Is it a bug or are we doing something wrong? The same exact openapi definition works with [redocly](https://redocly.com/) without any changes.