Skip to content

How to describe a "hash" in a get request #506

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
ceritium opened this issue Nov 12, 2015 · 4 comments
Closed

How to describe a "hash" in a get request #506

ceritium opened this issue Nov 12, 2015 · 4 comments

Comments

@ceritium
Copy link

Hello, I have to describe in swagger an API that send a hash of params with a get.

The documented request is like:

curl -v -X GET "https://example.com/usage.xml?api_key=1234&usage[hits]=1&usage[megas]=122"

In the server they get something like:

usage: {
  hits: 1,
  megas: 122
}

You can send as many attributes as you want.

How I can describe this kind of request with swagger 2.0?

Thanks!

@andrewdavidmackenzie
Copy link

Anyone got any ideas to help describe this issue?

@fehguy
Copy link
Contributor

fehguy commented Nov 23, 2015

That's a non-standard query syntax and it's currently not supported in the spec. I believe there's an open issue for this.

@webron
Copy link
Member

webron commented Nov 23, 2015

As @fehguy mentioned, this is currently not supported in the spec. Please follow #380 and #367.

@webron webron closed this as completed Nov 23, 2015
@ceritium
Copy link
Author

Thanks!

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

No branches or pull requests

4 participants