-
Notifications
You must be signed in to change notification settings - Fork 3
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
multiple headers, query parameters #14
Comments
relates to #8. we can peek at the (At the same time we can coerce to a number if they are asking for a number/integer, erroring if not possible. Ditto for arrays of numbers/integers.) |
This should all be written up somewhere for discussion, because deserialization is a common problem and the specification doesn't clearly explain how it should be done. |
Likewise, if a query parameter's top level "type" is "object", we can convert all the query parameters to an object type and therefore interdependencies between query parameters can be accomodated in the schema (e.g. paging parameters, where the presence of "limit" or "offset" means that "sort" is now required). Corrollary: only one query parameter is permitted if the object type is used, as that will gobble up all the query parameters (what if another query parameter was processed first and ate one? do we remove that from the object that is sent to the rest? or is this an error?) |
The suggestion at https://swagger.io/docs/specification/serialization/ is that if the schema "type" = "object", "style" = "form" and "explode" = true, the individual parameter name is not used in the serialized URI and that the object's keys and values occupy the entire query part of the URI. so confusing! |
Need to create an exclusion list of header names that should never be split by
|
This may be useful once it's standardized, for parsing newly-defined headers: https://www.fastly.com/blog/improve-http-structured-headers |
ABNF for headers: https://datatracker.ietf.org/doc/html/rfc7230#section-7 |
Remember, for parameter styles like e.g. - name: filter
in: query
style: deepObject
required: false
schema:
type: object
properties:
name:
type: string
colour:
type: string
- name: ids_only
in: query
style: form
required: false
schema:
enum: [0, 1, false, true] |
Headers and query parameters can both be duplicated (with same or different values) in the request, but we totally gloss over that.
The text was updated successfully, but these errors were encountered: