valid-schema-enum-item-type
Overview
This rule belongs to the openapi-v3-apimatic-syntax-linting
ruleset and states that:
Each item within the enum list should match the expected schema type. In case an item does not conform to the specified type, it may lead to unexpected behavior or errors when consuming the API.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | One or more items defined in the enum list do not conform to the schema type. |
Code | OPENAPI3APIMATICSYNTAX_L662 |
Type | Linting |
Rule System | Syntax |
Broad Category | OpenAPI Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi syntax linting apimatic schema enum item type |
Suggested Fixes
- Make sure all items in an enum list have the same type.
- Remove items from enum list which do not conform to the enumeration type.