This rule belongs to the
apimatic-preliminary-validation ruleset and states that:
Discriminator mapping values indicate possible values that a discriminator property can have in a data and which concrete models they map to. This helps in the deserialization process. It is, therefore, expected that a mapping value is provided for each of the models involved in the type combinator definition and a missing value for any model would indicate incomplete information.
|Discriminator mapping value information is missing for one or more models.
|Code Generation, Developer Experience Portal, API Transformer
discriminator mapping values
global type combinators
- Make sure that a discriminator mapping value is provided for all model/object types involved in the type combinator (anyOf, oneOf, not) definition.
- Make sure that the model name in the discriminator mapping value matches exactly with the name of the model/object types involved in the type combinator (anyOf, oneOf, not) definition.
- Names are compared in a case-sensitive manner.
- Remove the models from the type combinator definition that have missing mapping information.