Skip to main content

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.

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

For More Information