schema-max-length-cannot-be-less-than-min-length
Overview
This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:
The maximum length of a schema cannot be less than the minimum length. In other words, if a minimum length is specified for a schema, the maximum length must be greater than or equal to that minimum length.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Warning |
| Message | Maximum length is less than minimum length. |
| Code | OPENAPI3APIMATIC_L679 |
| 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 length greater less maximum length |
Suggested Fixes
- Check the schema definition to confirm the minimum and maximum lengths specified for the schema.
- Compare the minimum and maximum lengths to identify if the maximum length is less than the minimum length.
- Update the maximum length to be greater than or equal to the minimum length specified in the schema.