Module: JSI

Extended by:
Util
Defined in:
lib/jsi.rb,
lib/jsi/base.rb,
lib/jsi/json.rb,
lib/jsi/util.rb,
lib/jsi/schema.rb,
lib/jsi/version.rb,
lib/jsi/jsi_coder.rb,
lib/jsi/json/node.rb,
lib/jsi/base/to_rb.rb,
lib/jsi/metaschema.rb,
lib/jsi/pathed_node.rb,
lib/jsi/simple_wrap.rb,
lib/jsi/json/pointer.rb,
lib/jsi/schema_classes.rb,
lib/jsi/metaschema_node.rb,
lib/jsi/typelike_modules.rb,
lib/schemas/json-schema.org/draft-04/schema.rb,
lib/schemas/json-schema.org/draft-06/schema.rb

Defined Under Namespace

Modules: Arraylike, Hashlike, JSON, Metaschema, PathedArrayNode, PathedHashNode, PathedNode, Schema, SchemaClasses, SchemaModule, SchemaModulePossibly, SimpleWrap, Typelike, Util Classes: Base, Bug, JSICoder, MetaschemaNode, NotASchemaModule

Constant Summary collapse

ROOT_PATH =
Pathname.new(__FILE__).dirname.parent.expand_path
RESOURCES_PATH =
ROOT_PATH.join('resources')
VERSION =
"0.4.0".freeze
JSONSchemaOrgDraft04 =
MetaschemaNode.new(schema_content).jsi_schema_module
JSONSchemaOrgDraft06 =
MetaschemaNode.new(schema_content).jsi_schema_module

Constants included from Util

Util::NOOP

Class Method Summary collapse

Methods included from Util

deep_stringify_symbol_keys, stringify_symbol_keys, ycomb

Class Method Details

.class_for_schemas(*schemas) ⇒ Class subclassing JSI::Base

Returns a JSI class which represents the given schemas. an instance of the class represents a JSON Schema instance described by all of the given schemas.

Parameters:

  • schemas (Enumerable<JSI::Schema, #to_hash, Boolean>)

    schemas to represent with the class

Returns:

  • (Class subclassing JSI::Base)

    a JSI class which represents the given schemas. an instance of the class represents a JSON Schema instance described by all of the given schemas.



47
48
49
# File 'lib/jsi.rb', line 47

def self.class_for_schemas(*schemas)
  SchemaClasses.class_for_schemas(*schemas)
end