browser
browser copied to clipboard
`Json::matchesSchema()`
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?
I've not ever worked on a project where we did something like that
Ok, probably just start with the same api as api-platform uses (pass array or json string).
Closed via #102