Conversation
…ssing - When an optional parameter is sent in the request with explicit `null` value, set it to default if provided
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
| $paramExists = $existsInRequest || $existsInValues; | ||
|
|
||
| if ($existsInRequest) { | ||
| if ($existsInRequest && !($param['optional'] && $requestParams[$key] === null)) { |
There was a problem hiding this comment.
What if we want to actually pass null to an optional param?
There was a problem hiding this comment.
what should we do? should we check if validator is nullable ? what do we do? if null value is supported, shouldn't default be null? do we have a case where we support null but also have something else as default value?
nullvalue, set it to default if provided