File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change 117117 }
118118 ]
119119 },
120+ {
121+ "description" : " A $dynamicRef without anchor in fragment behaves identical to $ref" ,
122+ "schema" : {
123+ "$schema" : " https://json-schema.org/draft/2020-12/schema" ,
124+ "$id" : " https://test.json-schema.org/dynamicRef-without-anchor/root" ,
125+ "$ref" : " list" ,
126+ "$defs" : {
127+ "foo" : {
128+ "$dynamicAnchor" : " items" ,
129+ "type" : " string"
130+ },
131+ "list" : {
132+ "$id" : " list" ,
133+ "type" : " array" ,
134+ "items" : { "$dynamicRef" : " #/$defs/items" },
135+ "$defs" : {
136+ "items" : {
137+ "$comment" : " This is only needed to satisfy the bookending requirement" ,
138+ "$dynamicAnchor" : " items" ,
139+ "type" : " number"
140+ }
141+ }
142+ }
143+ }
144+ },
145+ "tests" : [
146+ {
147+ "description" : " An array of strings is invalid" ,
148+ "data" : [" foo" , " bar" ],
149+ "valid" : false
150+ },
151+ {
152+ "description" : " An array of numbers is valid" ,
153+ "data" : [24 , 42 ],
154+ "valid" : true
155+ }
156+ ]
157+ },
120158 {
121159 "description" : " A $dynamicRef with intermediate scopes that don't include a matching $dynamicAnchor does not affect dynamic scope resolution" ,
122160 "schema" : {
You can’t perform that action at this time.
0 commit comments