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

[Bug]: Trailing slash is always omitted from path #3350

Open
4 tasks done
sevein opened this issue May 14, 2024 · 0 comments · May be fixed by #3737
Open
4 tasks done

[Bug]: Trailing slash is always omitted from path #3350

sevein opened this issue May 14, 2024 · 0 comments · May be fixed by #3737
Assignees
Labels
breaking-change A change that might cause specs or code to break bug Something isn't working lib:http triaged:core
Milestone

Comments

@sevein
Copy link

sevein commented May 14, 2024

Describe the bug

Thank you for making this project available, it's really great.

I have been unable to describe a path that includes a trailing slash (e.g., /location/{id}/refresh/ as opposed to /location/{id}/refresh) using @typespec/openapi3. This is not just a cosmetic issue in the API I'm documenting, but it's actually required. This API can automatically redirect clients to the path with the trailing slash; however, this is not feasible for methods like POST, PUT, etc.

Thank you in advance!

Reproduction

https://typespec.io/playground?c=aW1wb3J0ICJAdHlwZXNwZWMvaHR0cCI7CtIZb3BlbmFwaSI7Cgp1c2luZyBUeXBlU3BlYy5IdHRwO9AVT3BlbkFQSTsKCkBzZXJ2aWNlCm5hbWVzcGFjZSBEZW1vU8YWIHsKICBAcm91dGUoIi9sb2NhdGlvbiIpCiAgyjBMxxfFLSAgLy8gUFJPQkxFTTogdGhlIGVtaXR0ZXIgb21pdHPFEnRyYWls5ACQc2xhc2guyDZJdCBzaG91bGQgcmVhZCBgyXAve2lkfS9yZWZyZXNoL2AgKHdpdGjTSinIS8hSTk9URTogSSBjYW4gbWl0aWdhdGXFOGlzc3VlIGluIEtpb3RhIMVQYSBtaWRkbGV3YXJlIGxpa2U6yEcgIOQBeHM6Ly9naXN0LmdpdGh1Yi5jb20vc2V2ZWluL2M5NjQ3ZjA5NzQ4YTljYTBjNjhhMjE3ZmUzM2VmMzBmxUlAb3BlcuUA0ElkKCLnAM7lAUvrAWPtAOrIHXBvc3TFCm9wIMccKMUQxBxhdGjHDGlkOiBpbnRlZ2VyLMUTKToge307CiAgfQp9Cg%3D%3D&e=%40typespec%2Fopenapi3&options=%7B%22linterRuleSet%22%3A%7B%22extends%22%3A%5B%22%40typespec%2Fhttp%2Fall%22%5D%7D%7D

Checklist

@sevein sevein added the bug Something isn't working label May 14, 2024
@markcowl markcowl added this to the [2024] June milestone May 14, 2024
@markcowl markcowl modified the milestones: [2024] June, [2024] July Jun 17, 2024
@timotheeguerin timotheeguerin linked a pull request Jul 2, 2024 that will close this issue
@timotheeguerin timotheeguerin self-assigned this Jul 3, 2024
@timotheeguerin timotheeguerin added the breaking-change A change that might cause specs or code to break label Jul 9, 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 bug Something isn't working lib:http triaged:core
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants