Skip to content

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
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