operation-parameter-redefines-path-object-parameter
Overview
This rule belongs to the openapi-v3-standards-linting
ruleset and states that:
If a parameter is defined under the parameters
property of the Operation Object as well as in the Path Item Object level parameters
, the Operation Object level parameter definition will override the definition found in the Path Item Object parameters but will not remove it.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Information |
Message | Operation Object level parameter is also defined in the Path Item Object and will override the definition found in the Path Item Object. |
Code | OPENAPI3STANDARDS_L040 |
Type | Linting |
Rule System | Semantic |
Broad Category | Operations |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic linting parameter operation path |
Suggested Fixes
- If you do not intend to override any Path Item Object level parameter or the parameter definitions at Path Item level and Operation level are exactly the same, remove the Operation Object level parameter's entry from the
parameters
property definition. - Parameter names are compared in a case-sensitive manner.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#operation-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-item-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#operation-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#parameter-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md
- https://docs.apimatic.io/rulesets/overview/