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.
Property | Value |
---|---|
Enabled | No |
Maximum Severity | Warning |
Message | String schema boundaries (i.e. pattern, minLength, and maxLength) are not defined. |
Code | OPENAPI3APIMATIC_L678 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Schemas |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 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.