Skip to content

Multidimensional param query #1954

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

Closed
Tom-Millard opened this issue Feb 25, 2019 · 3 comments
Closed

Multidimensional param query #1954

Tom-Millard opened this issue Feb 25, 2019 · 3 comments

Comments

@Tom-Millard
Copy link

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome
  • Version: 72
  • Method of installation: dist assets
  • Swagger-Editor version: latest
  • Swagger/OpenAPI version: OpenAPI 3.0

How can we help?

I am trying to create a multidimensional array as a parameter option, i would need to create something like this:

my.api.com/end-point?filter['option'][0]['value']='something'

I can reproduce this with type:object but i would get the following - my.api.com/end-point?filters['option'][0]={'value' : 'something'}

Im sure i am doing something wrong but i can not seem to find an example for this kind of pattern.

Any help would be appreciated.

@hkosova
Copy link
Contributor

hkosova commented Mar 5, 2019

This scenario looks similar to the deepObject serialization style, however, the OpenAPI Specification defines the deepObject behavior only for simple objects (with primitive properties) but not for nested objects or objects containing arrays. Please see these discussions in the OpenAPI Specification repository:

Support deep objects for query parameters with deepObject style
Are indexes in the query parameter array representable?
OAI/OpenAPI-Specification#1006 (comment)

So this scenario needs to be added to the OpenAPI Specification first. Once the Specification is updated, tool developers can implement the new behavior.

@Tom-Millard
Copy link
Author

@hkosova cheers for the reply will look into what you linked

@shockey
Copy link
Contributor

shockey commented Apr 5, 2019

Closing due to inactivity.

This is simply to keep our issue tracker clean - feel free to comment if there are any further thoughts or concerns, and we'll be happy to reopen this issue.

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

3 participants