schema-max-items-cannot-be-less-than-min-items
Overview
This rule belongs to the openapi-v3-apimatic-linting
ruleset and states that:
In OpenAPI specifications, for schemas that include array data types, the maximum number of items allowed in the array must be greater than or equal to the minimum number of items allowed in the array.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Schema maximum items is less than the minimum items. |
Code | OPENAPI3APIMATIC_L690 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi apimatic semantic linting minimum item greater less maximum item |
Suggested Fixes
- If any schema with an array data type has a maximum number of items that is less than the minimum number of items, update the schema to ensure that the maximum number of items allowed in the array is greater than or equal to the minimum number of items allowed in the array.
- Ensure that the updated schema is appropriate for the data being represented by the array.