Description
In the extended petstore OpenAPI example, the Pet
schema has a petType
tag that is used as a discriminator to determine which of the 3 variants of pet is actually used. Redoc supports it (see the POST /pet
route) and adjusts the properties presented in the UI based on the value of the discriminator property. RapiDoc does not currently appear to support this, at least not in the way the above example does it. For the record, Swagger UI doesn't support it either, despite this being a standard OpenAPI property).
There was recently a discussion from the OpenAPI team to deprecate discriminator
(see OAI/OpenAPI-Specification#2143), but the consensus now seems to be that it does have a clear purpose (namely: identify tagged unions) and should be kept.