-
Notifications
You must be signed in to change notification settings - Fork 10
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
Query string parameter validation of Arrays with style: form
and explode: false
#38
Comments
Yeah, true. At this point, parameters serialization and deserialization are not supported at all in this package. |
I also have ran into this issue today. Would this not be something that could be possibly fixed with the changes that were added here just recently? -> #36 |
Well, serialization is not so straightforward to me, as there are many supported serialization patterns: https://swagger.io/docs/specification/serialization/ #36 incorporates much simpler things like typecasting (it uses just |
In case it is of any use for ideas, we are generating clients from OpenAPI descriptions using the OpenAPI Code Generation project. Are using heavily customised templates (and still WIP) but this function converts an array of strings passed into an operation method, into a serialised parameter string suitable for a query parameters: This is one big we haven't touched yet, so probably needs some work, but I'm guessing deserialising a parameter will be the reverse of this. The serialisation looks fairly simple on the face of it, at least for query parameters (path parameters though, yikes). Would takling simple serialisation on just query parameters, effectively casting them to arrays using different joining patterns, be a relatively simple first step? I suspect that will be the most common use-case anyway. |
closed in favor of #47 |
Consider this swagger parameter definition (in YAML):
According to the Open Api Specification this will result in a query parameter
?filter=a,b,c
(which is also generated by Swagger UI)However, the validation does not consider a URL of that format as an array, but as a string:
The text was updated successfully, but these errors were encountered: