-
Notifications
You must be signed in to change notification settings - Fork 82
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
tsp, path allowReserved #2904
tsp, path allowReserved #2904
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,8 +59,8 @@ namespace Cadl.ContosoServer { | |
name: "Contoso.Sub.ContosoClient", | ||
service: Cadl.ContosoServer, | ||
}) | ||
@route("/contoso/{group}") | ||
@route("/contoso/") | ||
interface ServerOp { | ||
get(@path group: url): OkResponse | NoContentResponse; | ||
get(@path(#{ allowReserved: true }) group: string): OkResponse | NoContentResponse; | ||
} | ||
Comment on lines
-62
to
65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 0.59.0 requires either way
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to add another test case using URI template? ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Timothee is adding a cadl-ranch test. My local test, that Same effect on playground (Swagger having There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, it need to be (no
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This appears to be a bug in http lib. microsoft/typespec#4132 The Therefore I switched to |
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't deprecate the old logic of
uri for skip encoding, string for not skip encoding
. I added TODO to these part.Plan to check later. Let's have support for
allowReserved
first.It should be OK to drop such logic in TCGC SdkPackage migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, TCGC should handle it and returns correct collection format. I am integrating with latest TCGC. I will pay attention to the test case.