Module: Briard::SchemaUtils
- Included in:
- MetadataUtils
- Defined in:
- lib/briard/schema_utils.rb
Constant Summary collapse
- JSON_SCHEMA =
schema = File.read(File.('../../resources/json-schema/briard_schema.json', __dir__))
Instance Method Summary collapse
Instance Method Details
#json_schema_errors ⇒ Object
9 10 11 12 13 |
# File 'lib/briard/schema_utils.rb', line 9 def json_schema_errors schemer = JSONSchemer.schema(JSON_SCHEMA) errors = schemer.validate(self.).to_a errors.map {|err| JSONSchemer::Errors.pretty err }.presence end |