Open
Description
Hi , Does open-api core include support for discriminator
i tried it but didn't seem to work.
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#discriminatorObject
if not any hints on how i could include it in my project
components:
requestBodies:
object:
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/user'
- $ref: '#/components/schemas/admin'
discriminator:
propertyName: item_type
schemas:
user:
type: object
admin:
type: object
what i need is when the item_type is user in the request body it should be validated based on user schema and similarly for admin