no-ambiguous-path
Overview
This rule belongs to the openapi-v3-standards-linting
ruleset and states that:
Templated paths should not lead to an ambiguous resolution e.g. /{entity}/me and /books/{id} can result in the same path depending upon the values substituted and so are considered ambiguous.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Warning |
Message | Path may result in ambiguous resolution. |
Code | OPENAPI3STANDARDS_L020 |
Type | Linting |
Rule System | Semantic |
Broad Category | Paths |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | openapi3 openapi standards semantic linting template paths path |
Suggested Fixes
- If you are sure that the ambiguous templated paths are not likely to conflict with each other because of their possible substitution values, you may ignore this warning.
- If one of the ambiguous paths cover all information of the other path as well, consider removing one of the path definitions.
For More Information
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#path-templating-matching
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#paths-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#path-templating-matching
- 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/