@@ -62,6 +62,12 @@ public function testSchemaWithLocalAndExternalReferencesWithCircularReference()
62
62
$ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/car/properties/wheel " )
63
63
);
64
64
65
+ // properties ref
66
+ $ this ->assertEquals (
67
+ $ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/yardproperties " ),
68
+ $ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/yard/properties " )
69
+ );
70
+
65
71
// local ref with overriding
66
72
$ this ->assertNotEquals (
67
73
$ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/house/additionalProperties " ),
@@ -77,6 +83,7 @@ public function testSchemaWithLocalAndExternalReferencesWithCircularReference()
77
83
$ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/house " ),
78
84
$ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/house/properties/house " )
79
85
);
86
+
80
87
$ this ->assertEquals (
81
88
$ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/house " ),
82
89
$ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/house/properties/house/properties/house " )
@@ -123,6 +130,13 @@ private function getMainSchema()
123
130
'house ' => (object ) array (
124
131
'additionalProperties ' => true ,
125
132
'$ref ' => '#/definitions/house '
133
+ ),
134
+ 'yard ' => (object ) array (
135
+ 'type ' => 'object ' ,
136
+ 'additionalProperties ' => false ,
137
+ 'properties ' => (object ) array (
138
+ '$ref ' => '#/definitions/yardproperties '
139
+ )
126
140
)
127
141
),
128
142
'definitions ' => (object ) array (
@@ -144,6 +158,14 @@ private function getMainSchema()
144
158
'$ref ' => '#/definitions/house '
145
159
)
146
160
)
161
+ ),
162
+ 'yardproperties ' => (object ) array (
163
+ 'tree ' =>(object ) array (
164
+ 'type ' => 'string '
165
+ ),
166
+ 'pool ' =>(object ) array (
167
+ 'type ' => 'string '
168
+ )
147
169
)
148
170
)
149
171
);
0 commit comments