required-enum-default-value
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
All fields of an enumeration model must have a non-empty and non-null default value set. The default values represent the set of possible values of the enumeration and, therefore, cannot be empty or null.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | The default value of one or more fields of the enumeration model is not set. |
| Code | APIMATICPRE_V516 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Global Types/Models |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary checks validation apimatic default value enumeration type field custom type model complex model |
Suggested Fixes
- Make sure the default value of all fields of the enumeration model is set.
- Make sure that the default value of all fields of the enumeration model is non-empty, non-null.
- The default values represent the actual values of the enumeration.