single-declaration-of-discriminator
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
The discriminator must be declared once and in the base type only.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Discriminator re-declared in the child type. |
| Code | APIMATICPRE_V505 |
| 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 inheritance type custom type model complex model |
Suggested Fixes
- Remove the re-declaration of discriminator.
- Declare discriminator once in the base type only.