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 @@ -108,4 +108,31 @@ def test_array_fragment_resolution
108108 assert_valid schema , 5 , :fragment => "#/properties/a/anyOf/0"
109109 refute_valid schema , 5 , :fragment => "#/properties/a/anyOf/1"
110110 end
111+ def test_fragment_resolution_with_special_chars
112+ document = {
113+ "de~fi/nitions" => {
114+ "schemas" => [
115+ {
116+ "type" => "object" ,
117+ "required" => [ "a" ] ,
118+ "properties" => {
119+ "a" => {
120+ "type" => "object" ,
121+ }
122+ }
123+ } ,
124+ {
125+ "type" => "object" ,
126+ "properties" => {
127+ "b" => { "type" => "integer" }
128+ }
129+ }
130+ ]
131+ }
132+ }
133+
134+ data = { "b" => 5 }
135+ refute_valid document , data , :fragment => "#/de~0fi~1nitions/schemas/0"
136+ assert_valid document , data , :fragment => "#/de~0fi~1nitions/schemas/1"
137+ end
111138end
You can’t perform that action at this time.
0 commit comments