Closed jocubeit closed 8 years ago
Try something like:
draft_schema = JSON::Validator.validator_for_name("http://json-schema.org/draft-04/schema#")
JSON::Validator.validate!(draft_schema, your_schema)
Excellent, thanks, I'll try that.
To get this to work I had to use the metaschema
of the draft schema. So:
draft_schema = JSON::Validator.validator_for_name("http://json-schema.org/draft-04/schema#").metaschema
JSON::Validator.validate!(draft_schema, your_schema)
How can I just validate a schema against any of the built-in drafts in
/resources
? I don't want to validate any data, just that a schema is valid.