elasticgraph-json_schema 0.18.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +3 -0
- data/elasticgraph-json_schema.gemspec +16 -0
- data/lib/elastic_graph/json_schema/json_schema_draft_7_schema.json +172 -0
- data/lib/elastic_graph/json_schema/meta_schema_validator.rb +56 -0
- data/lib/elastic_graph/json_schema/validator.rb +40 -0
- data/lib/elastic_graph/json_schema/validator_factory.rb +103 -0
- metadata +245 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6d27de518ae5b2935f1a24cca436bdd71c9578283feaf8ee91c5ad63ea52730b
|
4
|
+
data.tar.gz: 5d7241ecceef9a3080e2de4f86c3d0afde7f356d1f53ee5b5a476215dfbe383d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e7b32ff1e5e3be8d05364e5406d53df66e1673694843e4e663edd91b7fdd7057ab49a9576416d90882737ee94670d38bda5641a38227efa0cb0bcf987c3b6e0b
|
7
|
+
data.tar.gz: 92f3263d379de21c0c3e43a42322c4a681936c1d13ce62433aa8bd03447563275e1a07dc91398aa2d714846ab77ab6f346ea3e7d3d4e8468e6239a6a3466da0b
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2024 Block, Inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
# Copyright 2024 Block, Inc.
|
2
|
+
#
|
3
|
+
# Use of this source code is governed by an MIT-style
|
4
|
+
# license that can be found in the LICENSE file or at
|
5
|
+
# https://opensource.org/licenses/MIT.
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
require_relative "../gemspec_helper"
|
10
|
+
|
11
|
+
ElasticGraphGemspecHelper.define_elasticgraph_gem(gemspec_file: __FILE__, category: :core) do |spec, eg_version|
|
12
|
+
spec.summary = "ElasticGraph gem that provides JSON Schema validation."
|
13
|
+
|
14
|
+
spec.add_dependency "elasticgraph-support", eg_version
|
15
|
+
spec.add_dependency "json_schemer", "~> 2.3"
|
16
|
+
end
|
@@ -0,0 +1,172 @@
|
|
1
|
+
{
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
3
|
+
"$id": "http://json-schema.org/draft-07/schema#",
|
4
|
+
"title": "Core schema meta-schema",
|
5
|
+
"definitions": {
|
6
|
+
"schemaArray": {
|
7
|
+
"type": "array",
|
8
|
+
"minItems": 1,
|
9
|
+
"items": { "$ref": "#" }
|
10
|
+
},
|
11
|
+
"nonNegativeInteger": {
|
12
|
+
"type": "integer",
|
13
|
+
"minimum": 0
|
14
|
+
},
|
15
|
+
"nonNegativeIntegerDefault0": {
|
16
|
+
"allOf": [
|
17
|
+
{ "$ref": "#/definitions/nonNegativeInteger" },
|
18
|
+
{ "default": 0 }
|
19
|
+
]
|
20
|
+
},
|
21
|
+
"simpleTypes": {
|
22
|
+
"enum": [
|
23
|
+
"array",
|
24
|
+
"boolean",
|
25
|
+
"integer",
|
26
|
+
"null",
|
27
|
+
"number",
|
28
|
+
"object",
|
29
|
+
"string"
|
30
|
+
]
|
31
|
+
},
|
32
|
+
"stringArray": {
|
33
|
+
"type": "array",
|
34
|
+
"items": { "type": "string" },
|
35
|
+
"uniqueItems": true,
|
36
|
+
"default": []
|
37
|
+
}
|
38
|
+
},
|
39
|
+
"type": ["object", "boolean"],
|
40
|
+
"properties": {
|
41
|
+
"$id": {
|
42
|
+
"type": "string",
|
43
|
+
"format": "uri-reference"
|
44
|
+
},
|
45
|
+
"$schema": {
|
46
|
+
"type": "string",
|
47
|
+
"format": "uri"
|
48
|
+
},
|
49
|
+
"$ref": {
|
50
|
+
"type": "string",
|
51
|
+
"format": "uri-reference"
|
52
|
+
},
|
53
|
+
"$comment": {
|
54
|
+
"type": "string"
|
55
|
+
},
|
56
|
+
"title": {
|
57
|
+
"type": "string"
|
58
|
+
},
|
59
|
+
"description": {
|
60
|
+
"type": "string"
|
61
|
+
},
|
62
|
+
"default": true,
|
63
|
+
"readOnly": {
|
64
|
+
"type": "boolean",
|
65
|
+
"default": false
|
66
|
+
},
|
67
|
+
"writeOnly": {
|
68
|
+
"type": "boolean",
|
69
|
+
"default": false
|
70
|
+
},
|
71
|
+
"examples": {
|
72
|
+
"type": "array",
|
73
|
+
"items": true
|
74
|
+
},
|
75
|
+
"multipleOf": {
|
76
|
+
"type": "number",
|
77
|
+
"exclusiveMinimum": 0
|
78
|
+
},
|
79
|
+
"maximum": {
|
80
|
+
"type": "number"
|
81
|
+
},
|
82
|
+
"exclusiveMaximum": {
|
83
|
+
"type": "number"
|
84
|
+
},
|
85
|
+
"minimum": {
|
86
|
+
"type": "number"
|
87
|
+
},
|
88
|
+
"exclusiveMinimum": {
|
89
|
+
"type": "number"
|
90
|
+
},
|
91
|
+
"maxLength": { "$ref": "#/definitions/nonNegativeInteger" },
|
92
|
+
"minLength": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
93
|
+
"pattern": {
|
94
|
+
"type": "string",
|
95
|
+
"format": "regex"
|
96
|
+
},
|
97
|
+
"additionalItems": { "$ref": "#" },
|
98
|
+
"items": {
|
99
|
+
"anyOf": [
|
100
|
+
{ "$ref": "#" },
|
101
|
+
{ "$ref": "#/definitions/schemaArray" }
|
102
|
+
],
|
103
|
+
"default": true
|
104
|
+
},
|
105
|
+
"maxItems": { "$ref": "#/definitions/nonNegativeInteger" },
|
106
|
+
"minItems": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
107
|
+
"uniqueItems": {
|
108
|
+
"type": "boolean",
|
109
|
+
"default": false
|
110
|
+
},
|
111
|
+
"contains": { "$ref": "#" },
|
112
|
+
"maxProperties": { "$ref": "#/definitions/nonNegativeInteger" },
|
113
|
+
"minProperties": { "$ref": "#/definitions/nonNegativeIntegerDefault0" },
|
114
|
+
"required": { "$ref": "#/definitions/stringArray" },
|
115
|
+
"additionalProperties": { "$ref": "#" },
|
116
|
+
"definitions": {
|
117
|
+
"type": "object",
|
118
|
+
"additionalProperties": { "$ref": "#" },
|
119
|
+
"default": {}
|
120
|
+
},
|
121
|
+
"properties": {
|
122
|
+
"type": "object",
|
123
|
+
"additionalProperties": { "$ref": "#" },
|
124
|
+
"default": {}
|
125
|
+
},
|
126
|
+
"patternProperties": {
|
127
|
+
"type": "object",
|
128
|
+
"additionalProperties": { "$ref": "#" },
|
129
|
+
"propertyNames": { "format": "regex" },
|
130
|
+
"default": {}
|
131
|
+
},
|
132
|
+
"dependencies": {
|
133
|
+
"type": "object",
|
134
|
+
"additionalProperties": {
|
135
|
+
"anyOf": [
|
136
|
+
{ "$ref": "#" },
|
137
|
+
{ "$ref": "#/definitions/stringArray" }
|
138
|
+
]
|
139
|
+
}
|
140
|
+
},
|
141
|
+
"propertyNames": { "$ref": "#" },
|
142
|
+
"const": true,
|
143
|
+
"enum": {
|
144
|
+
"type": "array",
|
145
|
+
"items": true,
|
146
|
+
"minItems": 1,
|
147
|
+
"uniqueItems": true
|
148
|
+
},
|
149
|
+
"type": {
|
150
|
+
"anyOf": [
|
151
|
+
{ "$ref": "#/definitions/simpleTypes" },
|
152
|
+
{
|
153
|
+
"type": "array",
|
154
|
+
"items": { "$ref": "#/definitions/simpleTypes" },
|
155
|
+
"minItems": 1,
|
156
|
+
"uniqueItems": true
|
157
|
+
}
|
158
|
+
]
|
159
|
+
},
|
160
|
+
"format": { "type": "string" },
|
161
|
+
"contentMediaType": { "type": "string" },
|
162
|
+
"contentEncoding": { "type": "string" },
|
163
|
+
"if": { "$ref": "#" },
|
164
|
+
"then": { "$ref": "#" },
|
165
|
+
"else": { "$ref": "#" },
|
166
|
+
"allOf": { "$ref": "#/definitions/schemaArray" },
|
167
|
+
"anyOf": { "$ref": "#/definitions/schemaArray" },
|
168
|
+
"oneOf": { "$ref": "#/definitions/schemaArray" },
|
169
|
+
"not": { "$ref": "#" }
|
170
|
+
},
|
171
|
+
"default": true
|
172
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# Copyright 2024 Block, Inc.
|
2
|
+
#
|
3
|
+
# Use of this source code is governed by an MIT-style
|
4
|
+
# license that can be found in the LICENSE file or at
|
5
|
+
# https://opensource.org/licenses/MIT.
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
require "elastic_graph/json_schema/validator"
|
10
|
+
require "elastic_graph/json_schema/validator_factory"
|
11
|
+
require "elastic_graph/support/hash_util"
|
12
|
+
require "json"
|
13
|
+
|
14
|
+
module ElasticGraph
|
15
|
+
module JSONSchema
|
16
|
+
# Provides a strict validator based on the JSON schema spec that a JSON schema document is valid.
|
17
|
+
def self.strict_meta_schema_validator
|
18
|
+
@strict_meta_schema_validator ||= MetaSchemaLoader.load_strict_validator
|
19
|
+
end
|
20
|
+
|
21
|
+
# Provides a validator that allows additional ElasticGraph metadata to be embedded
|
22
|
+
# in JSON schema for internal ElasticGraph use.
|
23
|
+
def self.elastic_graph_internal_meta_schema_validator
|
24
|
+
@elastic_graph_internal_meta_schema_validator ||= MetaSchemaLoader.load_strict_validator({
|
25
|
+
"properties" => {
|
26
|
+
"ElasticGraph" => {
|
27
|
+
"type" => "object",
|
28
|
+
"required" => ["type", "nameInIndex"],
|
29
|
+
"properties" => {
|
30
|
+
"type" => {"type" => "string"},
|
31
|
+
"nameInIndex" => {"type" => "string"}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
})
|
36
|
+
end
|
37
|
+
|
38
|
+
module MetaSchemaLoader
|
39
|
+
def self.load_strict_validator(overrides = {})
|
40
|
+
# Downloaded from: https://json-schema.org/draft-07/schema
|
41
|
+
schema = ::JSON.parse(::File.read(::File.expand_path("../json_schema_draft_7_schema.json", __FILE__)))
|
42
|
+
schema = Support::HashUtil.deep_merge(schema, overrides) unless overrides.empty?
|
43
|
+
|
44
|
+
# The meta schema allows additionalProperties in nearly every place. While a JSON schema definition
|
45
|
+
# with additional properties is considered valid, we do not intend to use any additional properties,
|
46
|
+
# and any usage of an additional property is almost certainly a typo. So here we set
|
47
|
+
# `with_unknown_properties_disallowed`.
|
48
|
+
root_schema = ValidatorFactory.new(schema: schema, sanitize_pii: false) # The meta schema has no PII
|
49
|
+
.with_unknown_properties_disallowed
|
50
|
+
.root_schema
|
51
|
+
|
52
|
+
Validator.new(schema: root_schema, sanitize_pii: false)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# Copyright 2024 Block, Inc.
|
2
|
+
#
|
3
|
+
# Use of this source code is governed by an MIT-style
|
4
|
+
# license that can be found in the LICENSE file or at
|
5
|
+
# https://opensource.org/licenses/MIT.
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
require "json"
|
10
|
+
|
11
|
+
module ElasticGraph
|
12
|
+
module JSONSchema
|
13
|
+
class Validator < ::Data.define(:schema, :sanitize_pii)
|
14
|
+
def valid?(data)
|
15
|
+
schema.valid?(data)
|
16
|
+
end
|
17
|
+
|
18
|
+
def validate(data)
|
19
|
+
schema.validate(data).map do |error|
|
20
|
+
# The schemas can be very large and make the output very noisy, hiding what matters. So we remove them here.
|
21
|
+
error.delete("root_schema")
|
22
|
+
error.delete("schema")
|
23
|
+
error
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# Validates the given data against the schema, returning an error message if it is invalid.
|
28
|
+
# The error message is suitable for throwing or logging, as we take care to ensure it contains
|
29
|
+
# no PII.
|
30
|
+
def validate_with_error_message(data)
|
31
|
+
errors = validate(data)
|
32
|
+
return if errors.empty?
|
33
|
+
|
34
|
+
errors.each { |error| error.delete("data") } if sanitize_pii
|
35
|
+
|
36
|
+
"Validation errors:\n\n#{errors.map { |e| ::JSON.pretty_generate(e) }.join("\n\n")}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# Copyright 2024 Block, Inc.
|
2
|
+
#
|
3
|
+
# Use of this source code is governed by an MIT-style
|
4
|
+
# license that can be found in the LICENSE file or at
|
5
|
+
# https://opensource.org/licenses/MIT.
|
6
|
+
#
|
7
|
+
# frozen_string_literal: true
|
8
|
+
|
9
|
+
require "elastic_graph/json_schema/validator"
|
10
|
+
require "json_schemer"
|
11
|
+
|
12
|
+
module ElasticGraph
|
13
|
+
module JSONSchema
|
14
|
+
class ValidatorFactory
|
15
|
+
# @dynamic root_schema
|
16
|
+
attr_reader :root_schema
|
17
|
+
|
18
|
+
def initialize(schema:, sanitize_pii:)
|
19
|
+
@raw_schema = schema
|
20
|
+
@root_schema = ::JSONSchemer.schema(
|
21
|
+
schema,
|
22
|
+
meta_schema: schema.fetch("$schema"),
|
23
|
+
# Here we opt to have regular expressions resolved using an ecmo-compatible resolver, instead of Ruby's.
|
24
|
+
#
|
25
|
+
# We do this because regexp patterns in our JSON schema are intended to be used by JSON schema libraries
|
26
|
+
# in many languages, not just in Ruby, and we want to support the widest compatibility. For example,
|
27
|
+
# Ruby requires that we use `\A` and `\z` to anchor the start and end of the string (`^` and `$` anchor the
|
28
|
+
# start and end of a line instead), where as ecmo regexes treat `^` and `$` as the start and end of the string.
|
29
|
+
# For a pattern to be usable by non-Ruby publishers, we need to use `^/`$` for our start/end anchors, and we
|
30
|
+
# want our validator to treat it the same way here.
|
31
|
+
#
|
32
|
+
# Also, this was the default before json_schemer 1.0 (and we used 0.x versions for a long time...).
|
33
|
+
# This maintains the historical behavior we've had.
|
34
|
+
#
|
35
|
+
# For more info:
|
36
|
+
# https://github.com/davishmcclurg/json_schemer/blob/v1.0.0/CHANGELOG.md#breaking-changes
|
37
|
+
regexp_resolver: "ecma"
|
38
|
+
)
|
39
|
+
|
40
|
+
@sanitize_pii = sanitize_pii
|
41
|
+
@validators_by_type_name = ::Hash.new do |hash, key|
|
42
|
+
# Create a copy of the schema with a ref to the type merged at the root.
|
43
|
+
# This ensures that any relative $ref paths will correctly resolve, while
|
44
|
+
# specifying the type we want to validate against using $ref.
|
45
|
+
hash[key] = Validator.new(
|
46
|
+
schema: root_schema.ref("#/$defs/#{key}"),
|
47
|
+
sanitize_pii: sanitize_pii
|
48
|
+
)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
def validator_for(type_name)
|
53
|
+
@validators_by_type_name[type_name]
|
54
|
+
end
|
55
|
+
|
56
|
+
# Changes the matcher to disallow additional properties. Property paths specified in
|
57
|
+
# `except` will be allowed.
|
58
|
+
def with_unknown_properties_disallowed(except: [])
|
59
|
+
allow_paths = except.map { |p| p.split(".") }
|
60
|
+
schema_copy = ::Marshal.load(::Marshal.dump(@raw_schema)) # deep copy so our mutations don't affect caller
|
61
|
+
prevent_unknown_properties!(schema_copy, allow_paths: allow_paths)
|
62
|
+
|
63
|
+
ValidatorFactory.new(schema: schema_copy, sanitize_pii: @sanitize_pii)
|
64
|
+
end
|
65
|
+
|
66
|
+
private
|
67
|
+
|
68
|
+
# The meta schema allows additionalProperties in nearly every place. While a JSON schema definition
|
69
|
+
# with additional properties is considered valid, we do not intend to use any additional properties,
|
70
|
+
# and any usage of an additional property is almost certainly a typo. So here we mutate the meta
|
71
|
+
# schema to set `additionalProperties: false` everywhere.
|
72
|
+
def prevent_unknown_properties!(object, allow_paths:, parent_path: [])
|
73
|
+
case object
|
74
|
+
when ::Array
|
75
|
+
object.each { |value| prevent_unknown_properties!(value, allow_paths: allow_paths, parent_path: parent_path) }
|
76
|
+
when ::Hash
|
77
|
+
if object["properties"]
|
78
|
+
object["additionalProperties"] = false
|
79
|
+
|
80
|
+
allowed_extra_props = allow_paths.filter_map do |path|
|
81
|
+
*prefix, prop_name = path
|
82
|
+
prop_name if prefix == parent_path
|
83
|
+
end
|
84
|
+
|
85
|
+
allowed_extra_props.each_with_object(object["properties"]) do |prop_name, props|
|
86
|
+
# @type var empty_hash: ::Hash[::String, untyped]
|
87
|
+
empty_hash = {}
|
88
|
+
props[prop_name] ||= empty_hash
|
89
|
+
end
|
90
|
+
|
91
|
+
object["properties"].each do |key, value|
|
92
|
+
prevent_unknown_properties!(value, allow_paths: allow_paths, parent_path: parent_path + [key])
|
93
|
+
end
|
94
|
+
else
|
95
|
+
object.each do |key, value|
|
96
|
+
prevent_unknown_properties!(value, allow_paths: allow_paths, parent_path: parent_path)
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
metadata
ADDED
@@ -0,0 +1,245 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: elasticgraph-json_schema
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.18.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Myron Marston
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-08-27 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rubocop-factory_bot
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.26'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.26'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rubocop-rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop-rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: standard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.39.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.39.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: steep
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.7'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.7'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: coderay
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: flatware-rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.3.2
|
104
|
+
- - "<"
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '3.0'
|
107
|
+
type: :development
|
108
|
+
prerelease: false
|
109
|
+
version_requirements: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 2.3.2
|
114
|
+
- - "<"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: rspec
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '3.13'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - "~>"
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '3.13'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: super_diff
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: 0.12.1
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: 0.12.1
|
145
|
+
- !ruby/object:Gem::Dependency
|
146
|
+
name: simplecov
|
147
|
+
requirement: !ruby/object:Gem::Requirement
|
148
|
+
requirements:
|
149
|
+
- - "~>"
|
150
|
+
- !ruby/object:Gem::Version
|
151
|
+
version: '0.22'
|
152
|
+
type: :development
|
153
|
+
prerelease: false
|
154
|
+
version_requirements: !ruby/object:Gem::Requirement
|
155
|
+
requirements:
|
156
|
+
- - "~>"
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
version: '0.22'
|
159
|
+
- !ruby/object:Gem::Dependency
|
160
|
+
name: simplecov-console
|
161
|
+
requirement: !ruby/object:Gem::Requirement
|
162
|
+
requirements:
|
163
|
+
- - ">="
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 0.9.1
|
166
|
+
- - "<"
|
167
|
+
- !ruby/object:Gem::Version
|
168
|
+
version: '1.0'
|
169
|
+
type: :development
|
170
|
+
prerelease: false
|
171
|
+
version_requirements: !ruby/object:Gem::Requirement
|
172
|
+
requirements:
|
173
|
+
- - ">="
|
174
|
+
- !ruby/object:Gem::Version
|
175
|
+
version: 0.9.1
|
176
|
+
- - "<"
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '1.0'
|
179
|
+
- !ruby/object:Gem::Dependency
|
180
|
+
name: elasticgraph-support
|
181
|
+
requirement: !ruby/object:Gem::Requirement
|
182
|
+
requirements:
|
183
|
+
- - '='
|
184
|
+
- !ruby/object:Gem::Version
|
185
|
+
version: 0.18.0.0
|
186
|
+
type: :runtime
|
187
|
+
prerelease: false
|
188
|
+
version_requirements: !ruby/object:Gem::Requirement
|
189
|
+
requirements:
|
190
|
+
- - '='
|
191
|
+
- !ruby/object:Gem::Version
|
192
|
+
version: 0.18.0.0
|
193
|
+
- !ruby/object:Gem::Dependency
|
194
|
+
name: json_schemer
|
195
|
+
requirement: !ruby/object:Gem::Requirement
|
196
|
+
requirements:
|
197
|
+
- - "~>"
|
198
|
+
- !ruby/object:Gem::Version
|
199
|
+
version: '2.3'
|
200
|
+
type: :runtime
|
201
|
+
prerelease: false
|
202
|
+
version_requirements: !ruby/object:Gem::Requirement
|
203
|
+
requirements:
|
204
|
+
- - "~>"
|
205
|
+
- !ruby/object:Gem::Version
|
206
|
+
version: '2.3'
|
207
|
+
description:
|
208
|
+
email:
|
209
|
+
- myron@squareup.com
|
210
|
+
executables: []
|
211
|
+
extensions: []
|
212
|
+
extra_rdoc_files: []
|
213
|
+
files:
|
214
|
+
- LICENSE.txt
|
215
|
+
- README.md
|
216
|
+
- elasticgraph-json_schema.gemspec
|
217
|
+
- lib/elastic_graph/json_schema/json_schema_draft_7_schema.json
|
218
|
+
- lib/elastic_graph/json_schema/meta_schema_validator.rb
|
219
|
+
- lib/elastic_graph/json_schema/validator.rb
|
220
|
+
- lib/elastic_graph/json_schema/validator_factory.rb
|
221
|
+
homepage:
|
222
|
+
licenses:
|
223
|
+
- MIT
|
224
|
+
metadata:
|
225
|
+
gem_category: core
|
226
|
+
post_install_message:
|
227
|
+
rdoc_options: []
|
228
|
+
require_paths:
|
229
|
+
- lib
|
230
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
231
|
+
requirements:
|
232
|
+
- - "~>"
|
233
|
+
- !ruby/object:Gem::Version
|
234
|
+
version: '3.2'
|
235
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
|
+
requirements:
|
237
|
+
- - ">="
|
238
|
+
- !ruby/object:Gem::Version
|
239
|
+
version: '0'
|
240
|
+
requirements: []
|
241
|
+
rubygems_version: 3.5.9
|
242
|
+
signing_key:
|
243
|
+
specification_version: 4
|
244
|
+
summary: ElasticGraph gem that provides JSON Schema validation.
|
245
|
+
test_files: []
|