-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Equivalent paths are not allowed even thogh the path + verb combination is different #1677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
TL;DR: This is a limitation of the OpenAPI Specification and not a Swagger Editor issue. The error means that these paths
are considered identical and therefore invalid. They are identical because there's no way to tell if What you can do is define a single path paths:
/path/{paramName}:
get:
...
put:
... This limitation has been previously discussed in the OpenAPI Specification repository here: If you want to change the path matching behavior, file an enhancement request with OpenAPI Specification: |
What @hkosova said. |
I understand what you have to say @hkosova and thank you for the response. Regarding your comment:
It is fair to have ['/path/{paramName}' get] and [/path/{someOtherParamNameButTheVerbIsPut}' put]
I am not asking for something like this: But I don't understand why there is an issue when the verb + path combinations are different. My server is happy and has no qualms about it. Then why should the documentation have issues? :-) #854
I strongly encourage you to reopen this issue. |
They are not different. |
I have this problem as well. Consider this: I want to add multiple entries all under a specific date:
Each entry gets and ID, which means I can delete or update individual entries like this:
Given that the methods don't overlap because of different verbs, there's no way this can ever cause a conflict, and it works fine in the real world as well. Please reconsider this limitation in the future. |
@nickdnk interesting point - I see where you're coming from. Consider opening an issue over at https://github.com/OAI/OpenAPI-Specification - they're the folks in charge of what's allowed in Swagger/OpenAPI documents 😄 |
Any updates? |
It does weird behavior even if the prefix is different Semantic error at paths. /dependency/{project}/{component}/{installation}/{name} /installation/{project}/{component}/{name} |
Is there any hope to consider the verb as part of the path uniqueness?? |
I would also like to ask about the progress of using the verb for path uniqueness. |
Paste this spec in https://editor.swagger.io:
Though path+verb combinations are different, it throws error.
This is not expected at all!
The text was updated successfully, but these errors were encountered: