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

Keep trailing slash when building http routes #3737

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

timotheeguerin
Copy link
Member

fix #3350

@azure-sdk
Copy link
Collaborator

azure-sdk commented Jul 2, 2024

All changed packages have been documented.

  • @typespec/http
Show changes

@typespec/http - breaking ✏️

Keep trailing slash when building http routes, this is breaking if you used to have @route() ending with /.,> ,> | TypeSpec | Before | After |,> | ---------------------------------------------------------------- | ----------------- | ------------------ |,> | @route("users/") | users | users/ |,> | @route("users") | users | users |,> | on interface @route("users/") and on op @route("addresses/") | users/addresses | users/addresses/ |,> | on interface @route("users/") and on op @route("addresses") | users/addresses | users/addresses |

@azure-sdk
Copy link
Collaborator

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3737/

Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3737/

@sevein
Copy link

sevein commented Jul 5, 2024

@timotheeguerin, I've tested my reproduction in the linked playground, and the problem is solved. Looking forward to this being released! I didn't realize this would mean introducing backward-incompatible changes, but that makes sense - thanks for the thoughtful consideration.

@timotheeguerin timotheeguerin added the breaking-change A change that might cause specs or code to break label Jul 5, 2024
@timotheeguerin timotheeguerin self-assigned this Jul 11, 2024
Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

@timotheeguerin do we have a PR into typespec-next showing the impact?

@azure-sdk
Copy link
Collaborator

You can try these changes here

🛝 Playground 🌐 Website 📚 Next docs

Copy link
Contributor

@markcowl markcowl left a comment

Choose a reason for hiding this comment

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

Looks good pending breaking change review

@timotheeguerin timotheeguerin added this pull request to the merge queue Jul 15, 2024
Merged via the queue into microsoft:main with commit c7339f0 Jul 15, 2024
22 checks passed
@timotheeguerin timotheeguerin deleted the http-trailing-slash branch July 15, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A change that might cause specs or code to break lib:http
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Trailing slash is always omitted from path
4 participants