Per conversation with @nikophil. Use justinrainbow/json-schema to validate schema.
I don't have any experience with json schema but is it common the include the schema files in some kind of resource directory in your project? If so, maybe a BROWSER_JSON_SCHEMA_DIR env variable could be used to set this dir, then with: $json->matchesSchema('post.json'), post.json would be loaded relative to this env variable?
Per conversation with @nikophil. Use
justinrainbow/json-schema
to validate schema.I don't have any experience with json schema but is it common the include the schema files in some kind of resource directory in your project? If so, maybe a
BROWSER_JSON_SCHEMA_DIR
env variable could be used to set this dir, then with:$json->matchesSchema('post.json')
,post.json
would be loaded relative to this env variable?