This package can be used to validate that a given instance I matches a schema S: https://github.com/Julian/jsonschema/tree/master/jsonschema
I am looking for another package or method to tell whether a given schema S is valid JSON-Schema Draft XXX. Is there a standard way to do this?
One thought is to find a download the schema draft itself like draft 4 (http://json-schema.org/draft-04/schema#), and then pass that and S into validate but I'm wondering if there is a better way to check "this schema is a valid jsonschema".
That's precisely how schemas are validated! Download the meta-schema (declared in the $schema keyword) and validate the schema against the meta-schema. It's designed to do this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With