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

Document exploded form params #1566

Open
jamietanna opened this issue Apr 20, 2024 · 0 comments
Open

Document exploded form params #1566

jamietanna opened this issue Apr 20, 2024 · 0 comments

Comments

@jamietanna
Copy link
Collaborator


- exploded, form style query arguments, which are the default argument format
  in OpenAPI 3.0 are undecidable. Say that I have two objects, one composed of
  the fields `(name=bob, id=5)` and another which has `(name=shoe, color=brown)`.
  The first parameter is named `person` and the second is named `item`. The
  default marshaling style for query args would result in
  `/path/?name=bob,id=5&name=shoe,color=brown`. In order to tell what belongs
  to which object, we'd have to look at all the parameters and try to deduce it,
  but we're lazy, so we didn't. Don't use exploded form style arguments if
  you're passing around objects which have similar field names. If you
  used unexploded form parameters, you'd have
  `/path/?person=name,bob,id,5&item=name,shoe,color,brown`, which an be
  parsed unambiguously.

- Parameters can be defined via `schema` or via `content`. Use the `content` form
  for anything other than trivial objects, they can marshal to arbitrary JSON
  structures. When you send them as cookie (`in: cookie`) arguments, we will
  URL encode them, since JSON delimiters aren't allowed in cookies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant