same-schema-enum-item-type
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
The data type of each item defined in an enumeration list must conform to the type defined for the schema object.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Enumeration list contains one or more items that do not conform to the schema type defined. |
| Code | OPENAPI3APIMATIC_L695 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Schemas |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi apimatic semantic linting unique enum schema items entries |
Suggested Fixes
- Make sure all fields of an enumeration model have the same type.
- Make sure that none of the items in enumeration list in empty or null.
- Remove all enumeration items whose type do not conform to schema type.