-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Low
-
Severity 3 - Minor
Issue Summary
Jira REST API OpenAPI spec contains duplicate paths
According to https://spec.openapis.org/oas/v3.0.3#paths-object
A relative path to an individual endpoint. The field name MUST begin with a forward slash
. The path is appended (no relative URL resolution) to the expanded URL from the Server Object's url field in order to construct the full URL. Path templating is allowed. When matching URLs, concrete (non-templated) paths would be matched before their templated counterparts. Templated paths with the same hierarchy but different templated names MUST NOT exist as they are identical. In case of ambiguous matching, it's up to the tooling to decide which one to use.
However, we have the following duplicate paths in openAPI specs
- "/rest/api/3/field/{fieldId}" & "/rest/api/3/field/{id}"
These entries cause PathMustBeUnique validation errors.
Steps to Reproduce
- perform validation of OpenAPI specs in https://dac-static.atlassian.com/cloud/jira/platform/swagger-v3.v3.json according to https://spec.openapis.org/oas/v3.0.3 for example, using [Refitter
Expected Results
validation should be successful
Actual Results
validation fails with errors and as a result we cannot generate REST API client based on the OpenAPI spec.
Example error from Refitter
"Errors": [
{
"Message": "The path signature '/rest/api/3/field/{}' MUST be unique.",
"Pointer": "#/paths//rest/api/3/field/\{id}",
"RuleName": "PathMustBeUnique"
}
]
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available