Module: JSI::JSONSchemaDraft202012
- Extended by:
- SchemaModule::MetaSchemaModule
- Defined in:
- lib/schemas/json-schema.org/draft/2020-12/schema.rb,
lib/schemas/json-schema.org/draft/2020-12/schema.rb
Defined Under Namespace
Modules: Applicator, Content, Core, FormatAnnotation, MetaData, Unevaluated, Validation
Class Method Summary collapse
Instance Method Summary collapse
-
#defs ⇒ Base + JSONSchemaDraft202012::Defs?
$defsproperty reader. - #jsi_schema_module_connection_created(mod) ⇒ Object
Methods included from SchemaModule::MetaSchemaModule
described_dialect, new_schema, new_schema_module
Class Method Details
.name_vocab_schemas(metaschema_module, namespace: metaschema_module) ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/schemas/json-schema.org/draft/2020-12/schema.rb', line 20 def self.name_vocab_schemas(, namespace: ) find_module = proc { |uri| .schema.jsi_registry.find(uri).with_dynamic_scope_from().jsi_schema_module } namespace.const_set(:Core, find_module["https://json-schema.org/draft/2020-12/meta/core"]) namespace.const_set(:Applicator, find_module["https://json-schema.org/draft/2020-12/meta/applicator"]) namespace.const_set(:Unevaluated, find_module["https://json-schema.org/draft/2020-12/meta/unevaluated"]) namespace.const_set(:Validation, find_module["https://json-schema.org/draft/2020-12/meta/validation"]) namespace.const_set(:MetaData, find_module["https://json-schema.org/draft/2020-12/meta/meta-data"]) namespace.const_set(:FormatAnnotation, find_module["https://json-schema.org/draft/2020-12/meta/format-annotation"]) namespace.const_set(:Content, find_module["https://json-schema.org/draft/2020-12/meta/content"]) end |
Instance Method Details
#defs ⇒ Base + JSONSchemaDraft202012::Defs?
$defs property reader
53 54 55 |
# File 'lib/schemas/json-schema.org/draft/2020-12/schema.rb', line 53 def defs self['$defs'] end |
#jsi_schema_module_connection_created(mod) ⇒ Object
57 58 59 60 |
# File 'lib/schemas/json-schema.org/draft/2020-12/schema.rb', line 57 def jsi_schema_module_connection_created(mod) mod.define_singleton_method(:defs) { |**kw| self['$defs', **kw] } super end |