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