Class: JSONSkooma::Keywords::Core::Schema
- Defined in:
- lib/json_skooma/keywords/core/schema.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(parent_schema, value) ⇒ Schema
constructor
A new instance of Schema.
Methods inherited from Base
#each_schema, #evaluate, inherited, #instance_types, #key, #resolve, set_defaults, #static, value_schema=
Constructor Details
#initialize(parent_schema, value) ⇒ Schema
Returns a new instance of Schema.
10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/json_skooma/keywords/core/schema.rb', line 10 def initialize(parent_schema, value) super # todo: validate URI.validate(require_scheme=True, require_normalized=True) uri = URI.parse(value) parent_schema. = uri if parent_schema.is_a?(Metaschema) = parent_schema.registry.(uri) parent_schema.core_vocabulary ||= .core_vocabulary parent_schema.default_vocabularies ||= .default_vocabularies end end |