maximum-schema-property-name-length
Overview
This rule belongs to the openapi-v3-codegen-linting
ruleset and states that:
In an OpenAPI specification, the property keys define the properties of a schema object. This rule ensures that the length of the property keys does not exceed 50 characters, which is considered a best practice. Excessive schema property key lengths can create readability issues and can cause issues in code generation. Keeping them concise helps to ensure that they are easily understandable and convey their purpose clearly.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Schema property name exceeds 50 characters. |
Code | OPENAPI3CODEGEN_L623 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Schemas |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi semantic linting apimatic length proeprty name key schema |
Suggested Fixes
- Keep the schema property key short and code-friendly.
- Ensure that schema property key does not exceed 50 characters.