Skip to content

Conversation

ClaytonPassmore
Copy link
Contributor

Description

This fix is an alternative to #76. It allows arrays with a default value
to not raise an invalid parameter error when a value is not explicitly
sent in the request. It also raises an invalid parameter error when an
array parameter is explicitly sent up with a null value.

Additional Notes

This version of the fix was inspired by the comments in #76.

This fix is an alternative to #76. It allows arrays with a default value
to not raise an invalid parameter error when a value is not explicitly
sent in the request. It also raises an invalid parameter error when an
array parameter is explicitly sent up with a `null` value.
Copy link
Collaborator

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I definitely like this solution more, and it addresses the same issue for all parameter types, not just arrays 👏
It doesn't affect any existing test which means we're not changing any expected behaviour 👍

I'd like @ifellinaholeonce to have a look as well since this is a somewhat important and semantic change

Copy link
Collaborator

@ifellinaholeonce ifellinaholeonce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the great work @ClaytonPassmore !

@ifellinaholeonce ifellinaholeonce merged commit 567818c into nicolasblanco:master Sep 28, 2021
@ClaytonPassmore ClaytonPassmore deleted the fix/optional-array-with-default branch September 28, 2021 15:27
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.

3 participants