Skip to content
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

Failing test for an api with two different methods but same route. #1486

Closed

Conversation

marcusber
Copy link

No description provided.

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @marcusber
Thanks for the contribution.
I left a comment on the sample you added.

"version": "1.0"
},
"paths": {
"/api/v2/someroute/areatype/{index}/{arg}": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this snippet is invalid according to the specification

The following paths are considered identical and invalid:
/pets/{petId}
/pets/{name}

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the response. Do I understand this correctly that it would be fine if language below would be renamed to arg and regenerated?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, but as you do so you'd then have to follow JSON conventions and merge the two nodes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. I could also include the verb hard coded in the path to keep them seperated.

I guess you're just following the specification, but it makes no sense to me.
Decrease readability or clutter the path. A bit frustrating for something that did pass just fine and now is not, Server handled it well. Clients handled it well. The specification doesn't.

In the end it's just two different endpoints without a direct relation.

Anyways, thanks for your time @baywet to shed some light over the behaviour.

@baywet
Copy link
Member

baywet commented Nov 29, 2023

no worries, you can contribute to the specification if you think it needs to evolve :)
Closing

@baywet baywet closed this Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants