Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityWarning
MessageSchema maximum value is less than minimum value.
CodeOPENAPI3APIMATIC_L681
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 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.

For More Information