Some boolean/array properties have wrong values #77
Labels
bug
Something isn't working
needs investigation
Work is needed to figure out the root cause of the problem.
Milestone
When you are defining a Parameter like this:
and you try to get settings on that "code"-Property that are not set you will get values instead of null or undefined.
For example trying to get the "exclusiveMinimum"-Property will return "false" instead of null/undefined. This causes other frameworks like "justinrainbow/json-schema" to be unable to handle this.
I found the code responsible for this behaviour in
src/SpecBaseObject.php::__get (Line 341)
:Is there a reason why array and boolean are specially handled here? From my POV that is strange because when I am trying to get the value of a setting that is not set I would expect those to be undefined.
Best example is the "exclusiveMinimum"-Setting of the Integer-Type which will be set to false by this function if not set what will cause the schema to be invalid because there is no minimum defined.
The text was updated successfully, but these errors were encountered: