maximum-operation-parameter-name-length
Overview
This rule belongs to the openapi-v3-codegen-linting
ruleset and states that:
In an OpenAPI specification, operation parameters are used to describe inputs for an API operation. The parameter name is a unique identifier for a parameter and should be descriptive of the parameter's purpose. This rule ensures that the length of operation parameter names does not exceed 50 characters, which is considered a best practice.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Operation parameter name should not exceed 50 characters. |
Code | OPENAPI3CODEGEN_L204 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Operations |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi semantic linting apimatic operation parameter name length 50 characters |
Suggested Fixes
- Review the OpenAPI specification and identify any operation parameter names that exceed 50 characters.
- Modify the parameter names to shorten them to 50 characters or less.
- Consider using a descriptive but concise naming convention that conveys the purpose of the parameter while also keeping the length of the name within the recommended limit.