-
Notifications
You must be signed in to change notification settings - Fork 221
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
[http] Add Parameter Decorator @cookie
to Specify Cookie Parameters
#4761
Conversation
85c896a
to
a6f8a1c
Compare
a6f8a1c
to
b9656c3
Compare
I think that |
aren't cookies allowed in response(server asking client to set the following cookies) we might need to design and decide exactly what we want in those cases though |
I noticed that cookies can also be allowed or required in responses (e.g. in communication between servers). |
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.
Thanks for the contribution this is awesome! I think there is a little design around the response cookies we'll want to sort out before we merge this but this looks great overall!
Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com>
/azp run typespec - pr tools |
Azure Pipelines successfully started running 1 pipeline(s). |
I ran |
This comment was marked as resolved.
This comment was marked as resolved.
@timotheeguerin Hi, CI issues solved. Could you take a look? Thanks! |
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.
Hi @su8ru the PR looks great, we just need to confirm thats exactly what we want to do before merging. I believe this should make it for next release(early november).
Thanks again @su8ru for the contribution!! |
(why conflicted...? and does it resolved...?) |
yeah we have been reorganizating the docs, sorry I meant to go fix the conflict in your branch after I tried to merge it and forgot. |
…microsoft#4761) close microsoft#4739 - `@typespec/http` - add `@cookie` decorator to decorate parameters as cookie parameters - add `response-cookie-not-supported` diagnostics - to be emitted when response cookies are specified - add tests for cookie params - `@typespec/http-server-javascript` - throw UnimplementedError when cookie params came - `@typespec/openapi3` - support cookie param case - add tests for cookie params ### response cookie design | in | explicit body | implicit body | | - | - | - | | diagnostics | `metadata-ignored` | `response-cookie-not-supported` | | result | included (unified with other metadata) | NOT included (prevent breaking change for `set-cookie`) | --- based on: - microsoft#4721 --------- Co-authored-by: Timothee Guerin <timothee.guerin@outlook.com> Co-authored-by: Timothee Guerin <tiguerin@microsoft.com>
close #4739
@typespec/http
@cookie
decorator to decorate parameters as cookie parametersresponse-cookie-not-supported
diagnostics@typespec/http-server-javascript
@typespec/openapi3
response cookie design
metadata-ignored
response-cookie-not-supported
set-cookie
)based on: