-
Notifications
You must be signed in to change notification settings - Fork 83
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
Model not supported as GET Operation parameter #497
Comments
Initially this was by design as the complexity of marshaling an arbitrary object to url parameters would need to make a lot of assumption on the parsing libraries on the other end. Ultimately I think we should consider:
Would love your thoughts on (a) or (b) and also generally would love to understand how common this is for you. |
I really like this idea. We could start with allowing only model types where all fields are primitives and expand that at a later point if needed. In general it shoud be pretty straight forward to (de)marshal nested types with the dot-notation (e.g. foo.bar.baz=blah&foo.bar.bam=boom&...) |
+1 to support this only on models with primitives only. I think this will cover most of the cases. |
Of note: Swagger also does not support non-primitive models in the querystring - so marshalling into/out of dot-notation primitive parameters works with that. One concern would be the limits on querystring size for large, complex models. |
from discussion
|
As per documentation an operation parameter type could be either an enum, a model, or a primitive type.
This does not work for GET operations though. My model / operation look like this
Uploading the api.json I get the following error:
It would be nice if query parameters models would be supported using the parameter name as prefix . In my example it would look something like this:
WDYT?
The text was updated successfully, but these errors were encountered: