Support for arbitrary query strings
See original GitHub issueHello! I’m trying to use the OpenAPI 3.0 spec to document an API that supports a subset of the Resource Query Language (RQL). However, because this query string format doesn’t adhere to the typical name=value
parameter structure, I’m struggling to express it in OpenAPI.
For example, a valid query string might be: http://localhost:5000/books?select(title,author)>(published,2000-06-30T12:20:08Z)&sort(published)
.
I wouldn’t expect OpenAPI to understand RQL, but if there were a way to specify that an endpoint may have a query string, and that the query string contents are beyond the scope of OpenAPI, that would suffice. (I’m really thinking from the Swagger UI perspective – so a user wanting to try the API can type in the entire RQL query string themselves.)
If anyone has any thoughts on other ways this can be accomplished with the existing 3.0 specification, that would be great too!
Thanks, Paul
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:15 (8 by maintainers)
Top GitHub Comments
@keyz182 your scenario can be described by using a
deepObject
-style parameter:@pofallon yeah that is why I was thinking we’d need a new “in” value.
in: query
assumesapplication/x-www-form-urlencoded
. Thecontent
just applies to the value of the URL-encoded value, not the query string as a whole.So
in: queryContent
orin: wholeQueryString
or something like that.(troll mode: or, just fully support RFC 6570 😃