Closed
Description
Without doing this, it might accept Array input from the caller without complaining, but the validation against those schemas will fail later with
get_object_vars() expects parameter 1 to be object, array given
at https://github.com/justinrainbow/json-schema/blob/6.0.0-dev/src/JsonSchema/SchemaStorage.php#L118
Calling BaseConsstraint::arrayToObjectRecursive()
in addSchema
before https://github.com/justinrainbow/json-schema/blob/6.0.0-dev/src/JsonSchema/SchemaStorage.php#L61, as Validator::validate()
does https://github.com/justinrainbow/json-schema/blob/6.0.0-dev/src/JsonSchema/Validator.php#L49-L51 should solve the problem, and make handling it in Validator::validate()
unecessary.
Metadata
Metadata
Assignees
Labels
No labels