Module: ElasticGraph::JSONSchema
- Defined in:
- elasticgraph-json_schema/lib/elastic_graph/json_schema/meta_schema_validator.rb,
elasticgraph-json_schema/lib/elastic_graph/json_schema/validator.rb,
elasticgraph-json_schema/lib/elastic_graph/json_schema/validator_factory.rb
Overview
Provides JSON Schema validation for ElasticGraph.
Defined Under Namespace
Modules: MetaSchemaLoader Classes: Validator, ValidatorFactory
Class Method Summary collapse
-
.elastic_graph_internal_meta_schema_validator ⇒ Validator
Provides a validator to validate a JSON schema definition according to the JSON schema meta schema.
-
.strict_meta_schema_validator ⇒ Validator
Provides a validator to validate a JSON schema definitions according to the JSON schema meta schema.
Class Method Details
.elastic_graph_internal_meta_schema_validator ⇒ Validator
Provides a validator to validate a JSON schema definition according to the JSON schema meta schema. The validator is configured to validate strictly, so that non-standard JSON schema properties are disallowed, except for internal ElasticGraph metadata properties.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'elasticgraph-json_schema/lib/elastic_graph/json_schema/meta_schema_validator.rb', line 32 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 ⇒ Validator
Provides a validator to validate a JSON schema definitions according to the JSON schema meta schema. The validator is configured to validate strictly, so that non-standard JSON schema properties are disallowed.
22 23 24 |
# File 'elasticgraph-json_schema/lib/elastic_graph/json_schema/meta_schema_validator.rb', line 22 def self. @strict_meta_schema_validator ||= MetaSchemaLoader.load_strict_validator end |