You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given you have a parameter definition like this, where the name ends with a "[]", because that is a standard you've agreed on.
parameters:
- name: ids[]description: IDs of the things to getin: queryschema:
type: arrayitems:
type: integer
Expected behavior:
For a request like GET /things?ids[]=1&ids=[]=2, I would expect committee to convert the array items to integers as described in the API description.
Current behavior:
Array items do not get converted to integers, but remain strings.
I guess this is mostly due to Rack's default handling of "xx[]" parameters, as it handles those as an "xx" array by default, so this might be tricky.
Do you plan to support this? If so I would be happy to help.
The text was updated successfully, but these errors were encountered:
Hi. I have wrapped unpacking and conversion of query / path / header / cookie parameters according to OpenAPI 3 in this gem: https://github.com/ahx/openapi_parameters
It supports all variations of style and explode and applies defaults according to the spec (for example style: form, explode: true for query parameters). It think committee would benefit especially from parsing query parameters exactly as described in the spec. It would be great if you can take a look and share your thoughts. I am also happy to change anything to meet your requirements.
This is related to #253
Given you have a parameter definition like this, where the name ends with a "[]", because that is a standard you've agreed on.
Expected behavior:
For a request like
GET /things?ids[]=1&ids=[]=2
, I would expect committee to convert the array items to integers as described in the API description.Current behavior:
Array items do not get converted to integers, but remain strings.
I guess this is mostly due to Rack's default handling of "xx[]" parameters, as it handles those as an "xx" array by default, so this might be tricky.
Do you plan to support this? If so I would be happy to help.
The text was updated successfully, but these errors were encountered: