File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -54,4 +54,31 @@ def test_fragment_resolution_with_array
5454 refute_valid document , data , :fragment => "#/definitions/schemas/0"
5555 assert_valid document , data , :fragment => "#/definitions/schemas/1"
5656 end
57+ def test_fragment_resolution_with_special_chars
58+ document = {
59+ "de~fi/nitions" => {
60+ "schemas" => [
61+ {
62+ "type" => "object" ,
63+ "required" => [ "a" ] ,
64+ "properties" => {
65+ "a" => {
66+ "type" => "object" ,
67+ }
68+ }
69+ } ,
70+ {
71+ "type" => "object" ,
72+ "properties" => {
73+ "b" => { "type" => "integer" }
74+ }
75+ }
76+ ]
77+ }
78+ }
79+
80+ data = { "b" => 5 }
81+ refute_valid document , data , :fragment => "#/de~0fi~1nitions/schemas/0"
82+ assert_valid document , data , :fragment => "#/de~0fi~1nitions/schemas/1"
83+ end
5784end
You can’t perform that action at this time.
0 commit comments