Skip to main content

string-schema-boundaries-defined

Overview

This rule belongs to the openapi-v3-apimatic-linting ruleset and states that:

The schema properties for a string should define the pattern, minLength and maxLength attributes. These attributes help to define the constraints on the format and length of the string value. Please check the schema definition in the API specification for the string type and ensure that it has the pattern, minLength, and maxLength attributes defined with appropriate values.

PropertyValue
EnabledNo
Maximum SeverityWarning
MessageString schema boundaries (i.e. pattern, minLength, and maxLength) are not defined.
CodeOPENAPI3APIMATIC_L678
TypeLinting
Rule SystemSemantic
Broad CategoryOpenAPI Schemas
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsopenapi3 openapi apimatic semantic linting string property pattern minLength maxLength schema

Suggested Fixes

  • Check that the schema definition for the string type has the pattern, minLength, and maxLength attributes defined.

For More Information