non-identical-templated-paths
Overview
This rule belongs to the openapi-v3-standards-validation
ruleset and states that:
When matching URLs, concrete (non-templated) paths are matched before their templated counterparts. Templated paths with the same hierarchy but different templated names must not exist as they are considered identical.
Property | Value |
---|---|
Enabled | Yes |
Maximum Severity | Error |
Message | An identical templated path already exists. |
Code | OPENAPI3STANDARDS_V037 |
Type | Validation |
Rule System | Semantic |
Broad Category | Paths |
Products Impacted | API Transformer |
Tags | openapi3 openapi standards semantic validation template paths path |
Suggested Fixes
- Paths like '/pets/{petId}' and '/pets/{name}' are considered identical i.e. the difference in variable name alone does not make the path unique.
- Remove entries of identical paths to avoid this issue.
For More Information
- 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#paths-object
- https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#openapi-specification
- https://docs.apimatic.io/rulesets/overview/