json-schema 2.8.0 → 2.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +27 -0
  3. data/lib/json-schema.rb +1 -2
  4. data/lib/json-schema/attributes/dependencies.rb +0 -6
  5. data/lib/json-schema/attributes/dependencies_v4.rb +11 -0
  6. data/lib/json-schema/attributes/divisibleby.rb +1 -1
  7. data/lib/json-schema/attributes/formats/custom.rb +1 -1
  8. data/lib/json-schema/attributes/formats/date.rb +1 -1
  9. data/lib/json-schema/attributes/formats/date_time.rb +1 -1
  10. data/lib/json-schema/attributes/formats/date_time_v4.rb +1 -1
  11. data/lib/json-schema/attributes/formats/time.rb +1 -1
  12. data/lib/json-schema/attributes/formats/uri.rb +1 -1
  13. data/lib/json-schema/attributes/limit.rb +0 -127
  14. data/lib/json-schema/attributes/limits/items.rb +15 -0
  15. data/lib/json-schema/attributes/limits/length.rb +15 -0
  16. data/lib/json-schema/attributes/limits/max_items.rb +15 -0
  17. data/lib/json-schema/attributes/limits/max_length.rb +15 -0
  18. data/lib/json-schema/attributes/limits/max_properties.rb +15 -0
  19. data/lib/json-schema/attributes/limits/maximum.rb +15 -0
  20. data/lib/json-schema/attributes/limits/maximum_inclusive.rb +11 -0
  21. data/lib/json-schema/attributes/limits/min_items.rb +15 -0
  22. data/lib/json-schema/attributes/limits/min_length.rb +15 -0
  23. data/lib/json-schema/attributes/limits/min_properties.rb +15 -0
  24. data/lib/json-schema/attributes/limits/minimum.rb +15 -0
  25. data/lib/json-schema/attributes/limits/minimum_inclusive.rb +11 -0
  26. data/lib/json-schema/attributes/limits/numeric.rb +16 -0
  27. data/lib/json-schema/attributes/limits/properties.rb +15 -0
  28. data/lib/json-schema/attributes/properties.rb +0 -8
  29. data/lib/json-schema/attributes/properties_v4.rb +13 -0
  30. data/lib/json-schema/validator.rb +3 -1
  31. data/lib/json-schema/validators/draft6.rb +2 -2
  32. data/resources/draft-06.json +34 -34
  33. metadata +19 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 598f5a11313e53a8a719936d8bbe08bddb6d07b3
4
- data.tar.gz: d9a1cde316718f0fdfd042f737bcb3d1b637d313
2
+ SHA256:
3
+ metadata.gz: 3361b9ea49eb9e208babcec94973eb5efd0d371c2a2cbab16cca9e6555b11b77
4
+ data.tar.gz: 82f4c4d50b75db5d379555c76ca2606580c14d74a0ec5088504cfb5f5025e1ed
5
5
  SHA512:
6
- metadata.gz: e28327d9e15a145572c347c2124a9645a4e303cbad1641dde72dad47536f2071eb0fcc9628b439bb24d6f109cf1fd146d8cba2728236d2a88717a29db20fe875
7
- data.tar.gz: b414849b2f9e74d7bfcfb0198ff11739caeb08eebd4929a5bd6e445b1a89c3b79c916b453f2c3d9cde05719f997e5b6eac0835534cbacc2bdb9016c296c8228f
6
+ metadata.gz: 5040893a974d35c4e9833076d8db0073215fdc6330535a4ae7c7d3eef3bdfd902e3642ed5bd9729735b65d8821e30db2b563411d4fd6cf0187c6efe2a4179669
7
+ data.tar.gz: 9161d768e8829faafefeabf7723c462019831393d4c696ccbc9b7f7be9f5affcc988cf93a2ce1709ea1b6cddd70230fa44815cd4a3e965b7c15ea65b2b0c3de2
data/README.md CHANGED
@@ -375,6 +375,33 @@ schema = {
375
375
  errors = JSON::Validator.fully_validate(schema, {"a" => "23"})
376
376
  ```
377
377
 
378
+ Validating a JSON Schema
379
+ ------------------------
380
+
381
+ To validate that a JSON Schema conforms to the JSON Schema standard,
382
+ you need to validate your schema against the metaschema for the appropriate
383
+ JSON Schema Draft. All of the normal validation methods can be used
384
+ for this. First retrieve the appropriate metaschema from the internal
385
+ cache (using `JSON::Validator.validator_for_name()` or
386
+ `JSON::Validator.validator_for_uri()`) and then simply validate your
387
+ schema against it.
388
+
389
+
390
+ ```ruby
391
+ require "json-schema"
392
+
393
+ schema = {
394
+ "type" => "object",
395
+ "properties" => {
396
+ "a" => {"type" => "integer"}
397
+ }
398
+ }
399
+
400
+ metaschema = JSON::Validator.validator_for_name("draft4").metaschema
401
+ # => true
402
+ JSON::Validator.validate(metaschema, schema)
403
+ ```
404
+
378
405
  Controlling Remote Schema Reading
379
406
  ---------------------------------
380
407
 
@@ -14,6 +14,5 @@ require 'json-schema/schema'
14
14
  require 'json-schema/schema/reader'
15
15
  require 'json-schema/validator'
16
16
 
17
- Dir[File.join(File.dirname(__FILE__), "json-schema/attributes/*.rb")].each {|file| require file }
18
- Dir[File.join(File.dirname(__FILE__), "json-schema/attributes/formats/*.rb")].each {|file| require file }
17
+ Dir[File.join(File.dirname(__FILE__), "json-schema/attributes/**/*.rb")].each {|file| require file }
19
18
  Dir[File.join(File.dirname(__FILE__), "json-schema/validators/*.rb")].sort!.each {|file| require file }
@@ -34,11 +34,5 @@ module JSON
34
34
  value.is_a?(String) || value.is_a?(Array) || value.is_a?(Hash)
35
35
  end
36
36
  end
37
-
38
- class DependenciesV4Attribute < DependenciesAttribute
39
- def self.accept_value?(value)
40
- value.is_a?(Array) || value.is_a?(Hash)
41
- end
42
- end
43
37
  end
44
38
  end
@@ -0,0 +1,11 @@
1
+ require 'json-schema/attributes/dependencies'
2
+
3
+ module JSON
4
+ class Schema
5
+ class DependenciesV4Attribute < DependenciesAttribute
6
+ def self.accept_value?(value)
7
+ value.is_a?(Array) || value.is_a?(Hash)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -12,7 +12,7 @@ module JSON
12
12
 
13
13
  factor = current_schema.schema[keyword]
14
14
 
15
- if factor == 0 || factor == 0.0 || (BigDecimal.new(data.to_s) % BigDecimal.new(factor.to_s)).to_f != 0
15
+ if factor == 0 || factor == 0.0 || (BigDecimal(data.to_s) % BigDecimal(factor.to_s)).to_f != 0
16
16
  message = "The property '#{build_fragment(fragments)}' was not divisible by #{factor}"
17
17
  validation_error(processor, message, fragments, current_schema, self, options[:record_errors])
18
18
  end
@@ -1,4 +1,4 @@
1
- require 'json-schema/attribute'
1
+ require 'json-schema/attributes/format'
2
2
  require 'json-schema/errors/custom_format_error'
3
3
 
4
4
  module JSON
@@ -1,4 +1,4 @@
1
- require 'json-schema/attribute'
1
+ require 'json-schema/attributes/format'
2
2
 
3
3
  module JSON
4
4
  class Schema
@@ -1,4 +1,4 @@
1
- require 'json-schema/attribute'
1
+ require 'json-schema/attributes/format'
2
2
 
3
3
  module JSON
4
4
  class Schema
@@ -1,4 +1,4 @@
1
- require 'json-schema/attribute'
1
+ require 'json-schema/attributes/format'
2
2
 
3
3
  module JSON
4
4
  class Schema
@@ -1,4 +1,4 @@
1
- require 'json-schema/attribute'
1
+ require 'json-schema/attributes/format'
2
2
 
3
3
  module JSON
4
4
  class Schema
@@ -1,4 +1,4 @@
1
- require 'json-schema/attribute'
1
+ require 'json-schema/attributes/format'
2
2
  require 'json-schema/errors/uri_error'
3
3
 
4
4
  module JSON
@@ -48,132 +48,5 @@ module JSON
48
48
  raise NotImplementedError
49
49
  end
50
50
  end
51
-
52
- class MinLengthAttribute < LimitAttribute
53
- def self.acceptable_type
54
- String
55
- end
56
-
57
- def self.limit_name
58
- 'minLength'
59
- end
60
-
61
- def self.error_message(schema)
62
- "was not of a minimum string length of #{limit(schema)}"
63
- end
64
-
65
- def self.value(data)
66
- data.length
67
- end
68
- end
69
-
70
- class MaxLengthAttribute < MinLengthAttribute
71
- def self.limit_name
72
- 'maxLength'
73
- end
74
-
75
- def self.error_message(schema)
76
- "was not of a maximum string length of #{limit(schema)}"
77
- end
78
- end
79
-
80
- class MinItemsAttribute < LimitAttribute
81
- def self.acceptable_type
82
- Array
83
- end
84
-
85
- def self.value(data)
86
- data.length
87
- end
88
-
89
- def self.limit_name
90
- 'minItems'
91
- end
92
-
93
- def self.error_message(schema)
94
- "did not contain a minimum number of items #{limit(schema)}"
95
- end
96
- end
97
-
98
- class MaxItemsAttribute < MinItemsAttribute
99
- def self.limit_name
100
- 'maxItems'
101
- end
102
-
103
- def self.error_message(schema)
104
- "had more items than the allowed #{limit(schema)}"
105
- end
106
- end
107
-
108
- class MinPropertiesAttribute < LimitAttribute
109
- def self.acceptable_type
110
- Hash
111
- end
112
-
113
- def self.value(data)
114
- data.size
115
- end
116
-
117
- def self.limit_name
118
- 'minProperties'
119
- end
120
-
121
- def self.error_message(schema)
122
- "did not contain a minimum number of properties #{limit(schema)}"
123
- end
124
- end
125
-
126
- class MaxPropertiesAttribute < MinPropertiesAttribute
127
- def self.limit_name
128
- 'maxProperties'
129
- end
130
-
131
- def self.error_message(schema)
132
- "had more properties than the allowed #{limit(schema)}"
133
- end
134
- end
135
-
136
- class NumericLimitAttribute < LimitAttribute
137
- def self.acceptable_type
138
- Numeric
139
- end
140
-
141
- def self.error_message(schema)
142
- exclusivity = exclusive?(schema) ? 'exclusively' : 'inclusively'
143
- format("did not have a %s value of %s, %s", limit_name, limit(schema), exclusivity)
144
- end
145
- end
146
-
147
- class MaximumAttribute < NumericLimitAttribute
148
- def self.limit_name
149
- 'maximum'
150
- end
151
-
152
- def self.exclusive?(schema)
153
- schema['exclusiveMaximum']
154
- end
155
- end
156
-
157
- class MaximumInclusiveAttribute < MaximumAttribute
158
- def self.exclusive?(schema)
159
- schema['maximumCanEqual'] == false
160
- end
161
- end
162
-
163
- class MinimumAttribute < NumericLimitAttribute
164
- def self.limit_name
165
- 'minimum'
166
- end
167
-
168
- def self.exclusive?(schema)
169
- schema['exclusiveMinimum']
170
- end
171
- end
172
-
173
- class MinimumInclusiveAttribute < MinimumAttribute
174
- def self.exclusive?(schema)
175
- schema['minimumCanEqual'] == false
176
- end
177
- end
178
51
  end
179
52
  end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limit'
2
+
3
+ module JSON
4
+ class Schema
5
+ class ItemsLimitAttribute < LimitAttribute
6
+ def self.acceptable_type
7
+ Array
8
+ end
9
+
10
+ def self.value(data)
11
+ data.length
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limit'
2
+
3
+ module JSON
4
+ class Schema
5
+ class LengthLimitAttribute < LimitAttribute
6
+ def self.acceptable_type
7
+ String
8
+ end
9
+
10
+ def self.value(data)
11
+ data.length
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/items'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MaxItemsAttribute < ItemsLimitAttribute
6
+ def self.limit_name
7
+ 'maxItems'
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ "had more items than the allowed #{limit(schema)}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/length'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MaxLengthAttribute < LengthLimitAttribute
6
+ def self.limit_name
7
+ 'maxLength'
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ "was not of a maximum string length of #{limit(schema)}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/properties'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MaxPropertiesAttribute < PropertiesLimitAttribute
6
+ def self.limit_name
7
+ 'maxProperties'
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ "had more properties than the allowed #{limit(schema)}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/numeric'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MaximumAttribute < NumericLimitAttribute
6
+ def self.limit_name
7
+ 'maximum'
8
+ end
9
+
10
+ def self.exclusive?(schema)
11
+ schema['exclusiveMaximum']
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,11 @@
1
+ require 'json-schema/attributes/limits/maximum'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MaximumInclusiveAttribute < MaximumAttribute
6
+ def self.exclusive?(schema)
7
+ schema['maximumCanEqual'] == false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/items'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MinItemsAttribute < ItemsLimitAttribute
6
+ def self.limit_name
7
+ 'minItems'
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ "did not contain a minimum number of items #{limit(schema)}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/length'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MinLengthAttribute < LengthLimitAttribute
6
+ def self.limit_name
7
+ 'minLength'
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ "was not of a minimum string length of #{limit(schema)}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/properties'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MinPropertiesAttribute < PropertiesLimitAttribute
6
+ def self.limit_name
7
+ 'minProperties'
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ "did not contain a minimum number of properties #{limit(schema)}"
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limits/numeric'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MinimumAttribute < NumericLimitAttribute
6
+ def self.limit_name
7
+ 'minimum'
8
+ end
9
+
10
+ def self.exclusive?(schema)
11
+ schema['exclusiveMinimum']
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,11 @@
1
+ require 'json-schema/attributes/limits/minimum'
2
+
3
+ module JSON
4
+ class Schema
5
+ class MinimumInclusiveAttribute < MinimumAttribute
6
+ def self.exclusive?(schema)
7
+ schema['minimumCanEqual'] == false
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ require 'json-schema/attributes/limit'
2
+
3
+ module JSON
4
+ class Schema
5
+ class NumericLimitAttribute < LimitAttribute
6
+ def self.acceptable_type
7
+ Numeric
8
+ end
9
+
10
+ def self.error_message(schema)
11
+ exclusivity = exclusive?(schema) ? 'exclusively' : 'inclusively'
12
+ format("did not have a %s value of %s, %s", limit_name, limit(schema), exclusivity)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ require 'json-schema/attributes/limit'
2
+
3
+ module JSON
4
+ class Schema
5
+ class PropertiesLimitAttribute < LimitAttribute
6
+ def self.acceptable_type
7
+ Hash
8
+ end
9
+
10
+ def self.value(data)
11
+ data.size
12
+ end
13
+ end
14
+ end
15
+ end
@@ -62,13 +62,5 @@ module JSON
62
62
  end
63
63
  end
64
64
  end
65
-
66
- class PropertiesV4Attribute < PropertiesAttribute
67
- # draft4 relies on its own RequiredAttribute validation at a higher level, rather than
68
- # as an attribute of individual properties.
69
- def self.required?(schema, options)
70
- options[:strict] == true
71
- end
72
- end
73
65
  end
74
66
  end
@@ -0,0 +1,13 @@
1
+ require 'json-schema/attributes/properties'
2
+
3
+ module JSON
4
+ class Schema
5
+ class PropertiesV4Attribute < PropertiesAttribute
6
+ # draft4 relies on its own RequiredAttribute validation at a higher level, rather than
7
+ # as an attribute of individual properties.
8
+ def self.required?(schema, options)
9
+ options[:strict] == true
10
+ end
11
+ end
12
+ end
13
+ end
@@ -103,6 +103,8 @@ module JSON
103
103
 
104
104
  if @options[:list]
105
105
  base_schema.to_array_schema
106
+ elsif base_schema.is_a?(Hash)
107
+ JSON::Schema.new(base_schema, schema_uri, @options[:version])
106
108
  else
107
109
  base_schema
108
110
  end
@@ -578,7 +580,7 @@ module JSON
578
580
  begin
579
581
  json_uri = Util::URI.normalized_uri(data)
580
582
  data = self.class.parse(custom_open(json_uri))
581
- rescue JSON::Schema::JsonLoadError
583
+ rescue JSON::Schema::JsonLoadError, JSON::Schema::UriError
582
584
  # Silently discard the error - use the data as-is
583
585
  end
584
586
  end
@@ -43,8 +43,8 @@ module JSON
43
43
  'uri' => UriFormat
44
44
  }
45
45
  @formats = @default_formats.clone
46
- @uri = JSON::Util::URI.parse("http://json-schema.org/draft-06/schema#")
47
- @names = ["draft6", "http://json-schema.org/draft-06/schema#"]
46
+ @uri = JSON::Util::URI.parse("http://json-schema.org/draft/schema#")
47
+ @names = ["draft6", "http://json-schema.org/draft/schema#"]
48
48
  @metaschema_name = "draft-06.json"
49
49
  end
50
50
 
@@ -1,7 +1,7 @@
1
1
  {
2
- "id": "http://json-schema.org/draft-06/schema#",
3
- "$schema": "http://json-schema.org/draft-06/schema#",
4
- "description": "Core schema meta-schema",
2
+ "$schema": "http://json-schema.org/draft/schema#",
3
+ "$id": "http://json-schema.org/draft/schema#",
4
+ "title": "Core schema meta-schema",
5
5
  "definitions": {
6
6
  "schemaArray": {
7
7
  "type": "array",
@@ -13,28 +13,43 @@
13
13
  "minimum": 0
14
14
  },
15
15
  "positiveIntegerDefault0": {
16
- "allOf": [ { "$ref": "#/definitions/positiveInteger" }, { "default": 0 } ]
16
+ "allOf": [
17
+ { "$ref": "#/definitions/positiveInteger" },
18
+ { "default": 0 }
19
+ ]
17
20
  },
18
21
  "simpleTypes": {
19
- "enum": [ "array", "boolean", "integer", "null", "number", "object", "string" ]
22
+ "enum": [
23
+ "array",
24
+ "boolean",
25
+ "integer",
26
+ "null",
27
+ "number",
28
+ "object",
29
+ "string"
30
+ ]
20
31
  },
21
32
  "stringArray": {
22
33
  "type": "array",
23
34
  "items": { "type": "string" },
24
- "minItems": 1,
25
- "uniqueItems": true
35
+ "uniqueItems": true,
36
+ "defaultItems": []
26
37
  }
27
38
  },
28
- "type": "object",
39
+ "type": ["object", "boolean"],
29
40
  "properties": {
30
- "id": {
41
+ "$id": {
31
42
  "type": "string",
32
- "format": "uri"
43
+ "format": "uri-reference"
33
44
  },
34
45
  "$schema": {
35
46
  "type": "string",
36
47
  "format": "uri"
37
48
  },
49
+ "$ref": {
50
+ "type": "string",
51
+ "format": "uri-reference"
52
+ },
38
53
  "title": {
39
54
  "type": "string"
40
55
  },
@@ -44,22 +59,19 @@
44
59
  "default": {},
45
60
  "multipleOf": {
46
61
  "type": "number",
47
- "minimum": 0,
48
- "exclusiveMinimum": true
62
+ "exclusiveMinimum": 0
49
63
  },
50
64
  "maximum": {
51
65
  "type": "number"
52
66
  },
53
67
  "exclusiveMaximum": {
54
- "type": "boolean",
55
- "default": false
68
+ "type": "number"
56
69
  },
57
70
  "minimum": {
58
71
  "type": "number"
59
72
  },
60
73
  "exclusiveMinimum": {
61
- "type": "boolean",
62
- "default": false
74
+ "type": "number"
63
75
  },
64
76
  "maxLength": { "$ref": "#/definitions/positiveInteger" },
65
77
  "minLength": { "$ref": "#/definitions/positiveIntegerDefault0" },
@@ -67,13 +79,7 @@
67
79
  "type": "string",
68
80
  "format": "regex"
69
81
  },
70
- "additionalItems": {
71
- "anyOf": [
72
- { "type": "boolean" },
73
- { "$ref": "#" }
74
- ],
75
- "default": {}
76
- },
82
+ "additionalItems": { "$ref": "#" },
77
83
  "items": {
78
84
  "anyOf": [
79
85
  { "$ref": "#" },
@@ -87,16 +93,11 @@
87
93
  "type": "boolean",
88
94
  "default": false
89
95
  },
96
+ "contains": { "$ref": "#" },
90
97
  "maxProperties": { "$ref": "#/definitions/positiveInteger" },
91
98
  "minProperties": { "$ref": "#/definitions/positiveIntegerDefault0" },
92
99
  "required": { "$ref": "#/definitions/stringArray" },
93
- "additionalProperties": {
94
- "anyOf": [
95
- { "type": "boolean" },
96
- { "$ref": "#" }
97
- ],
98
- "default": {}
99
- },
100
+ "additionalProperties": { "$ref": "#" },
100
101
  "definitions": {
101
102
  "type": "object",
102
103
  "additionalProperties": { "$ref": "#" },
@@ -121,6 +122,8 @@
121
122
  ]
122
123
  }
123
124
  },
125
+ "propertyNames": { "$ref": "#" },
126
+ "const": {},
124
127
  "enum": {
125
128
  "type": "array",
126
129
  "minItems": 1,
@@ -137,14 +140,11 @@
137
140
  }
138
141
  ]
139
142
  },
143
+ "format": { "type": "string" },
140
144
  "allOf": { "$ref": "#/definitions/schemaArray" },
141
145
  "anyOf": { "$ref": "#/definitions/schemaArray" },
142
146
  "oneOf": { "$ref": "#/definitions/schemaArray" },
143
147
  "not": { "$ref": "#" }
144
148
  },
145
- "dependencies": {
146
- "exclusiveMaximum": [ "maximum" ],
147
- "exclusiveMinimum": [ "minimum" ]
148
- },
149
149
  "default": {}
150
150
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json-schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.0
4
+ version: 2.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenny Hoxworth
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-07 00:00:00.000000000 Z
11
+ date: 2018-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -97,6 +97,7 @@ files:
97
97
  - lib/json-schema/attributes/allof.rb
98
98
  - lib/json-schema/attributes/anyof.rb
99
99
  - lib/json-schema/attributes/dependencies.rb
100
+ - lib/json-schema/attributes/dependencies_v4.rb
100
101
  - lib/json-schema/attributes/disallow.rb
101
102
  - lib/json-schema/attributes/divisibleby.rb
102
103
  - lib/json-schema/attributes/enum.rb
@@ -111,6 +112,20 @@ files:
111
112
  - lib/json-schema/attributes/formats/uri.rb
112
113
  - lib/json-schema/attributes/items.rb
113
114
  - lib/json-schema/attributes/limit.rb
115
+ - lib/json-schema/attributes/limits/items.rb
116
+ - lib/json-schema/attributes/limits/length.rb
117
+ - lib/json-schema/attributes/limits/max_items.rb
118
+ - lib/json-schema/attributes/limits/max_length.rb
119
+ - lib/json-schema/attributes/limits/max_properties.rb
120
+ - lib/json-schema/attributes/limits/maximum.rb
121
+ - lib/json-schema/attributes/limits/maximum_inclusive.rb
122
+ - lib/json-schema/attributes/limits/min_items.rb
123
+ - lib/json-schema/attributes/limits/min_length.rb
124
+ - lib/json-schema/attributes/limits/min_properties.rb
125
+ - lib/json-schema/attributes/limits/minimum.rb
126
+ - lib/json-schema/attributes/limits/minimum_inclusive.rb
127
+ - lib/json-schema/attributes/limits/numeric.rb
128
+ - lib/json-schema/attributes/limits/properties.rb
114
129
  - lib/json-schema/attributes/maxdecimal.rb
115
130
  - lib/json-schema/attributes/multipleof.rb
116
131
  - lib/json-schema/attributes/not.rb
@@ -119,6 +134,7 @@ files:
119
134
  - lib/json-schema/attributes/patternproperties.rb
120
135
  - lib/json-schema/attributes/properties.rb
121
136
  - lib/json-schema/attributes/properties_optional.rb
137
+ - lib/json-schema/attributes/properties_v4.rb
122
138
  - lib/json-schema/attributes/ref.rb
123
139
  - lib/json-schema/attributes/required.rb
124
140
  - lib/json-schema/attributes/type.rb
@@ -173,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
189
  version: '1.8'
174
190
  requirements: []
175
191
  rubyforge_project:
176
- rubygems_version: 2.6.8
192
+ rubygems_version: 2.7.6
177
193
  signing_key:
178
194
  specification_version: 4
179
195
  summary: Ruby JSON Schema Validator