Open videni opened 2 years ago
@videni may be $exception->getDataPointer() helps there?
try {
$result = $schema->in(json_decode(file_get_contents($dataFile)));
} catch (InvalidValue $e) {
return [
"dataPointer" => $e->getDataPointer(),
"schemaPointer" => $e->getSchemaPointer(),
"Message" => $e->getMessage()
]
}
Here is an error I got when I try to validate
JSON Data
JSON schema
The error I got.
Can we bind the error to the JSON data instead of the JSON schema. I need to present the which property is missing, or invalid, our customer will be insane if we show the error above. Even me , unable to figure out what the JSON data is wrong from the error above. please let me know if this is possible please at the moment.