Skip to content

v3.2: First pass at a style solution for cookies #4822

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

Draft
wants to merge 1 commit into
base: v3.2-dev
Choose a base branch
from

Conversation

handrews
Copy link
Member

@handrews handrews commented Aug 4, 2025

style: form (the default and only allowed value for cookies) has never really made sense, and a casual survey of implementations shows that it has been interpreted in ways that are rather surprising (e.g. stuffing an entire query string, percent-encoded including the delimiters, as the cookie value), where it is supported at all.

Rather than try to redefine how style: form behaves in the context of in: cookie, we can just define style: cookie that does what makes sense. Regrettably, compatibility rules prevent changing the default.

This is a draft because if this is accepted, there's a bit more tweaking to do, particularly with Appendix D. Also, I'd probably add an example.

  • schema changes are included in this pull request
  • schema changes are needed for this pull request but not done yet
  • no schema changes are needed for this pull request

@handrews handrews added this to the v3.2.0 milestone Aug 4, 2025
@handrews handrews requested a review from a team as a code owner August 4, 2025 20:58
@handrews handrews added the param serialization Issues related to parameter and/or header serialization label Aug 4, 2025
@handrews handrews requested a review from a team as a code owner August 4, 2025 20:58
@handrews handrews marked this pull request as draft August 4, 2025 20:59
We need to replace the not-very-functional style: form when
it comes to cookies.
Copy link
Contributor

@mikekistler mikekistler 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. 👍

@ralfhandl
Copy link
Contributor

This is probably the best we can do at the moment, so +1 from me.

Can we have an example for in: cookie, style: cookie with dataValue and serializedValue, and ideally a "pass" test case with the example?

@handrews
Copy link
Member Author

handrews commented Aug 8, 2025

@ralfhandl

Can we have an example for in: cookie, style: cookie with dataValue and serializedValue, and ideally a "pass" test case with the example?

Yup. Given two generally-positive reactions it's worth rounding this PR out as you suggest and taking it out of draft. Will do shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
param serialization Issues related to parameter and/or header serialization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants