This rule belongs to the
apimatic-preliminary-validation ruleset and states that:
A discriminator property in a global type combinator definition helps simplify deserialization of model types. This means that the types involved must be complex objects. If only primitive types are expected, a discriminator property is not applicable.
|Discriminator property is not applicable in the current context.
|Code Generation, Developer Experience Portal, API Transformer
global type combinators
- Use a discriminator only when complex objects are involved in the type combinator (anyOf, oneOf, not) cases.
- Remove any primitive type entry from the type combinator (anyOf, oneOf, not) cases.
- Remove discriminator information if complex objects are not expected.