json-schema 2.2.2 → 2.2.3
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.
- checksums.yaml +15 -0
- data/README.textile +1 -1
- data/lib/json-schema/schema.rb +4 -0
- data/test/test_ruby_schema.rb +31 -1
- metadata +5 -7
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTJkNGU0NjgxNmU1MDcwNzNhZGM1ZmJkZDczZmQ3OWY2ZDIxNjE5MA==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NzNjZTFiODkyZTY3YThkNGM1ZTRkZTFiNzFkOWM0MDhjOTM3NjRiNA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MjFlZGQyMWYwYjYzZmFjYWQyZjBlMzRiMWU0MjhkYmE2MGY5OWNiZTMwYWU2
|
10
|
+
ZDJlOTViNzczMDI2ZWRhYzcwMjk2ZGQ5MjQ2YjMyMzQwY2M5MzA5MjA2YmU5
|
11
|
+
NjIyNjA0MjU2YzA5MDc3MWU3OTczYzc0NWMzODVlYjMyMjFlODE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MjY2YTMwOTlkNjQyMzQwMGE4YjVmYjg2MGQ2ZGFhMWZjNDAwNmVkMDdlNTZm
|
14
|
+
YTk0NDk0YzA1NTQwMDk1YTBjOTU4MTllMDJhYTAyZGNjN2JjY2U5MDJhMDQ3
|
15
|
+
YjM1MTQzMjAyMjI4YTE2NGZhZWQyM2VjYzE5MWExM2Q0NmNkYTg=
|
data/README.textile
CHANGED
data/lib/json-schema/schema.rb
CHANGED
data/test/test_ruby_schema.rb
CHANGED
@@ -35,4 +35,34 @@ class RubySchemaTest < Test::Unit::TestCase
|
|
35
35
|
|
36
36
|
assert(JSON::Validator.validate(schema, data))
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
|
+
def test_symbol_keys_in_hash_within_array
|
40
|
+
schema = {
|
41
|
+
type: 'object',
|
42
|
+
properties: {
|
43
|
+
a: {
|
44
|
+
type: "array",
|
45
|
+
items: [
|
46
|
+
{
|
47
|
+
properties: {
|
48
|
+
b: {
|
49
|
+
type: "integer"
|
50
|
+
}
|
51
|
+
}
|
52
|
+
}
|
53
|
+
]
|
54
|
+
}
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
data = {
|
59
|
+
a: [
|
60
|
+
{
|
61
|
+
b: 1
|
62
|
+
}
|
63
|
+
]
|
64
|
+
}
|
65
|
+
|
66
|
+
assert(JSON::Validator.validate(schema, data, :validate_schema => true))
|
67
|
+
end
|
68
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json-schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.3
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Kenny Hoxworth
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2014-
|
11
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description:
|
15
14
|
email: hoxworth@gmail.com
|
@@ -114,27 +113,26 @@ files:
|
|
114
113
|
homepage: http://github.com/hoxworth/json-schema/tree/master
|
115
114
|
licenses:
|
116
115
|
- MIT
|
116
|
+
metadata: {}
|
117
117
|
post_install_message:
|
118
118
|
rdoc_options: []
|
119
119
|
require_paths:
|
120
120
|
- lib
|
121
121
|
required_ruby_version: !ruby/object:Gem::Requirement
|
122
|
-
none: false
|
123
122
|
requirements:
|
124
123
|
- - ! '>='
|
125
124
|
- !ruby/object:Gem::Version
|
126
125
|
version: '0'
|
127
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
-
none: false
|
129
127
|
requirements:
|
130
128
|
- - ! '>='
|
131
129
|
- !ruby/object:Gem::Version
|
132
130
|
version: '0'
|
133
131
|
requirements: []
|
134
132
|
rubyforge_project:
|
135
|
-
rubygems_version:
|
133
|
+
rubygems_version: 2.0.7
|
136
134
|
signing_key:
|
137
|
-
specification_version:
|
135
|
+
specification_version: 4
|
138
136
|
summary: Ruby JSON Schema Validator
|
139
137
|
test_files:
|
140
138
|
- test/test_all_of_ref_schema.rb
|