@@ -62,6 +62,12 @@ public function testSchemaWithLocalAndExternalReferencesWithCircularReference()
6262 $ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/car/properties/wheel " )
6363 );
6464
65+ // properties ref
66+ $ this ->assertEquals (
67+ $ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/yardproperties " ),
68+ $ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/yard/properties " )
69+ );
70+
6571 // local ref with overriding
6672 $ this ->assertNotEquals (
6773 $ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/house/additionalProperties " ),
@@ -77,6 +83,7 @@ public function testSchemaWithLocalAndExternalReferencesWithCircularReference()
7783 $ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/house " ),
7884 $ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/house/properties/house " )
7985 );
86+
8087 $ this ->assertEquals (
8188 $ schemaStorage ->resolveRef ("$ mainSchemaPath#/definitions/house " ),
8289 $ schemaStorage ->resolveRef ("$ mainSchemaPath#/properties/house/properties/house/properties/house " )
@@ -123,6 +130,13 @@ private function getMainSchema()
123130 'house ' => (object ) array (
124131 'additionalProperties ' => true ,
125132 '$ref ' => '#/definitions/house '
133+ ),
134+ 'yard ' => (object ) array (
135+ 'type ' => 'object ' ,
136+ 'additionalProperties ' => false ,
137+ 'properties ' => (object ) array (
138+ '$ref ' => '#/definitions/yardproperties '
139+ )
126140 )
127141 ),
128142 'definitions ' => (object ) array (
@@ -144,6 +158,14 @@ private function getMainSchema()
144158 '$ref ' => '#/definitions/house '
145159 )
146160 )
161+ ),
162+ 'yardproperties ' => (object ) array (
163+ 'tree ' =>(object ) array (
164+ 'type ' => 'string '
165+ ),
166+ 'pool ' =>(object ) array (
167+ 'type ' => 'string '
168+ )
147169 )
148170 )
149171 );
0 commit comments