non-empty-discriminator-mapping-key
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
Possible discriminator values provided as keys of the discriminator mapping information must be non-null and non-empty.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Discriminator mapping key is null or empty. |
| Code | APIMATICPRE_V584 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Global Types/Models |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary checks validation apimatic discriminator mapping discriminator value discriminator |
Suggested Fixes
- Make sure that the discriminator mapping keys are not null or empty.
- The keys represent possible values of the discriminator property in the data.