valid-path-item-parameter-name
Overview
This rule belongs to the openapi-v3-codegen-syntax-linting
ruleset and states that:
For successful Code Generation, the path item level parameter name must only use letters, numbers, underscores and dashes. It must not contain any leading/trailing white-space characters. Names are often used for naming the files generated as part of the code generation process, so, any forbidden file name characters are not allowed.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | Path item level parameter name is invalid. |
Code | OPENAPI3CODEGENSYNTAX_L170 |
Type | Linting |
Rule System | Syntax |
Broad Category | OpenAPI Path Items |
Products Impacted | Code Generation, Developer Experience Portal |
Tags | code generation sdks openapi3 openapi syntax linting apimatic path parameter name |
Suggested Fixes
- Make sure the parameter name of the path item object does not contain any forbidden characters.
- Use only letters, numbers, underscores and dashes.
- Remove any trailing/leading white-space characters, if present.
- If the parameter name in path item object cannot be changed, remove the component definition and its references (if any), to avoid issues.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-item-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#paths-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/