Module: ElasticGraph::JSONSchema
- Defined in:
- lib/elastic_graph/json_schema/validator.rb,
lib/elastic_graph/json_schema/validator_factory.rb,
lib/elastic_graph/json_schema/meta_schema_validator.rb
Defined Under Namespace
Modules: MetaSchemaLoader Classes: Validator, ValidatorFactory
Class Method Summary collapse
-
.elastic_graph_internal_meta_schema_validator ⇒ Object
Provides a validator that allows additional ElasticGraph metadata to be embedded in JSON schema for internal ElasticGraph use.
-
.strict_meta_schema_validator ⇒ Object
Provides a strict validator based on the JSON schema spec that a JSON schema document is valid.
Class Method Details
.elastic_graph_internal_meta_schema_validator ⇒ Object
Provides a validator that allows additional ElasticGraph metadata to be embedded in JSON schema for internal ElasticGraph use.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/elastic_graph/json_schema/meta_schema_validator.rb', line 23 def self. @elastic_graph_internal_meta_schema_validator ||= MetaSchemaLoader.load_strict_validator({ "properties" => { "ElasticGraph" => { "type" => "object", "required" => ["type", "nameInIndex"], "properties" => { "type" => {"type" => "string"}, "nameInIndex" => {"type" => "string"} } } } }) end |
.strict_meta_schema_validator ⇒ Object
Provides a strict validator based on the JSON schema spec that a JSON schema document is valid.
17 18 19 |
# File 'lib/elastic_graph/json_schema/meta_schema_validator.rb', line 17 def self. @strict_meta_schema_validator ||= MetaSchemaLoader.load_strict_validator end |