unique-schema-enum-items
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
If property enum is specified in the schema object, it must consist of only unique items in the list.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Enumeration list item is already defined. |
| Code | OPENAPI3APIMATIC_L694 |
| 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
- Remove redundant/duplicate entries from the enumeration list.
- Enumeration items are compared in a case-sensitive manner.
- Ensure that all the items in the list are unique.