We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I noticed some inconsistencies while using arrays in query.
When the schema is an array and;
This can be reproduced with the following test cases (to add in https://github.com/getkin/kin-openapi/blob/master/openapi3filter/req_resp_decoder_test.go#L859 ) :
{ name: "no param, for arrays", param: &openapi3.Parameter{Name: "something", In: "query", Schema: stringArraySchema}, query: "", want: nil, found: false, err: nil, }, { name: "missing param, for arrays", param: &openapi3.Parameter{Name: "something", In: "query", Schema: stringArraySchema}, query: "foo=bar", want: nil, // Will fail found: false, err: nil, },
This is due to the first case returning nil via this condition: https://github.com/getkin/kin-openapi/blob/master/openapi3filter/req_resp_decoder.go#L248 While the second case returns nil via this condition https://github.com/getkin/kin-openapi/blob/master/openapi3filter/req_resp_decoder.go#L524 (that function returns a []any, thus the nil is wrapped in a slice
The text was updated successfully, but these errors were encountered:
See #990 for a potential fix
Sorry, something went wrong.
fixes getkin#989 - openapi3filter: Remove inconsistency for arrays in…
0364aa7
… queries
Successfully merging a pull request may close this issue.
Hi,
I noticed some inconsistencies while using arrays in query.
When the schema is an array and;
This can be reproduced with the following test cases (to add in https://github.com/getkin/kin-openapi/blob/master/openapi3filter/req_resp_decoder_test.go#L859 ) :
This is due to the first case returning nil via this condition: https://github.com/getkin/kin-openapi/blob/master/openapi3filter/req_resp_decoder.go#L248
While the second case returns nil via this condition https://github.com/getkin/kin-openapi/blob/master/openapi3filter/req_resp_decoder.go#L524 (that function returns a []any, thus the nil is wrapped in a slice
The text was updated successfully, but these errors were encountered: