You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mapping Type Names
It is implied, that the property to which discriminator refers, contains the name of the target schema. In the example above, the objectType property should contain either simpleObject, or complexObject string. If the property values do not match the schema names, you can map the values to the names. To do this, use the discriminator/mapping keyword:
It seems to me that the docs should point out that this can and should be enforced using enum: like this:
Documentation at https://swagger.io/docs/specification/v3_0/data-models/inheritance-and-polymorphism/ includes this text:
It seems to me that the docs should point out that this can and should be enforced using
enum:
like this:The text was updated successfully, but these errors were encountered: