Skip to content
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

openapi3filter: Remove inconsistency for arrays in queries #990

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

TheSadlig
Copy link
Contributor

@TheSadlig TheSadlig commented Jul 23, 2024

See #989 for details, but in a nutshell:

  • DecodeArray returns a []any, which means that whenever DecodeArray returns nil, it will actually return a []interface{nil}
  • Viewed from decodeStyledParameter, this is an inconsistent behaviour, since decodeStyledParameter returns nil when the query parameters are empty, AND []interface{nil} when there is at least another parameter set.

I am unsure as to whether this is the best way to fix that issue, and am open to suggestions.

Thanks

@TheSadlig TheSadlig changed the title fixes #987 - openapi3filter: Remove inconsistency for arrays in queries fixes #989 - openapi3filter: Remove inconsistency for arrays in queries Jul 23, 2024
@fenollp fenollp linked an issue Jul 23, 2024 that may be closed by this pull request
@fenollp fenollp changed the title fixes #989 - openapi3filter: Remove inconsistency for arrays in queries openapi3filter: Remove inconsistency for arrays in queries Jul 23, 2024
@fenollp fenollp merged commit 1a2712f into getkin:master Jul 23, 2024
5 checks passed
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

Successfully merging this pull request may close these issues.

decodeStyledParameter has an inconsistency for arrays in query
3 participants