Skip to main content

schema-non-negative-min-length

Overview

This rule belongs to the openapi-v3-standards-validation ruleset and states that:

The numeric validation keyword minLength must have a non-negative integer value i.e. the value must be greater than or equal to 0.

PropertyValue
EnabledYes
Maximum SeverityError
MessageValue of property minLength is less than 0.
CodeOPENAPI3STANDARDS_V328
TypeValidation
Rule SystemSemantic
Broad CategorySchemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi standards semantic validation min length number integer json schema validation json schema

Suggested Fixes

  • Ensure that the value for the validation keyword is a valid integer.
  • Ensure that the value is not less than 0 i.e. a negative value.

For More Information