This rule belongs to the
openapi-v3-standards-validation ruleset and states that:
The discriminator is the name of the property that decides which schema definition validates the structure of the model. This field must be marked as a required schema field.
|Message||Discriminator field is marked as optional.|
|Products Impacted||API Transformer, Code Generation, Developer Experience Portal|
- Ensure that name of the schema property, which is marked as a discriminator, is also included in the schema's required list.
- If the schema property should not be a required property, it should not be marked as a discriminator.
- Name of the property marked as discriminator is compared with the schema property name in a case-sensitive manner.
For More Information