maximum-server-parameter-name-length
Overview
This rule belongs to the openapi-v3-codegen-linting
ruleset and states that:
The length of the server parameter name should not exceed 50 characters, as longer names can lead to problems in code generation and negatively impact user-friendliness.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Server parameter name violates maximum length restrictions. |
Code | OPENAPI3CODEGEN_L098 |
Type | Linting |
Rule System | Semantic |
Broad Category | OpenAPI Servers |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi semantic linting apimatic server parameter name length |
Suggested Fixes
- Shorten the server parameter name so that it does not exceed the limit.
- Try to keep the name under 25 characters.
For More Information
- https://docs.apimatic.io/specification-extensions/swagger-server-configuration-extensions/#server-object
- https://docs.apimatic.io/specification-extensions/swagger-server-configuration-extensions/#parameter-objects
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#server-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/