We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2a29296 commit 89f05e2Copy full SHA for 89f05e2
test/fragment_resolution_test.rb
@@ -27,4 +27,31 @@ def test_fragment_resolution
27
JSON::Validator.validate!(schema,data,:fragment => "#/properties/b")
28
end
29
30
+ def test_fragment_resolution_with_array
31
+ document = {
32
+ "definitions" => {
33
+ "schemas" => [
34
+ {
35
+ "type" => "object",
36
+ "required" => ["a"],
37
+ "properties" => {
38
+ "a" => {
39
40
+ }
41
42
+ },
43
44
45
46
+ "b" => {"type" => "integer" }
47
48
49
+ ]
50
51
52
+
53
+ data = {"b" => 5}
54
+ refute_valid document, data, :fragment => "#/definitions/schemas/0"
55
+ assert_valid document, data, :fragment => "#/definitions/schemas/1"
56
+ end
57
0 commit comments