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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
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
3 participants