Module: Openc::JsonSchema::Utils
Instance Method Summary collapse
Instance Method Details
#extract_json_schema(validator) ⇒ Object
16 17 18 |
# File 'lib/openc/json_schema/utils.rb', line 16 def extract_json_schema(validator) validator.instance_variable_get(:@base_schema) end |
#load_validator(schema_path, record) ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/openc/json_schema/utils.rb', line 6 def load_validator(schema_path, record) validator = JSON::Validator.new( schema_path, record, :record_errors => true, :errors_as_objects => true, :validate_schema => true ) end |