at-least-one-item-in-schema-enum-list
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
Enum list must not be empty as it is used to define a set of valid values for the schema. An empty enum list can cause ambiguity in the definition of acceptable values.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Empty schema enum list found which is not allowed. |
| Code | OPENAPI3APIMATIC_L693 |
| Type | Linting |
| Rule System | Semantic |
| Broad Category | OpenAPI Schemas |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | openapi3 openapi apimatic semantic linting empty enum schema |
Suggested Fixes
- Define at least one or more item for the schema enum list.
- Remove the schema enum list.