File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -269,13 +269,15 @@ public function isRefPointerToSchema():bool
269
269
270
270
public function isRefPointerToSelf ():bool
271
271
{
272
- $ schema = Json::decode (Json::encode ($ this ->schema ->getSchema ()->getSerializableData ()));
272
+ $ allOfsInSchema = null ;
273
+ if (isset ($ this ->schema ->getSchema ()->properties [$ this ->name ]->allOf )) {
274
+ $ allOfsInSchema = $ this ->schema ->getSchema ()->properties [$ this ->name ]->allOf ;
275
+ }
273
276
274
- if (isset ($ schema ['properties ' ][$ this ->name ]['allOf ' ])) { # fixes https://github.com/php-openapi/yii2-openapi/issues/68
275
- $ allOfs = $ schema ['properties ' ][$ this ->name ]['allOf ' ];
277
+ if ($ allOfsInSchema ) { # fixes https://github.com/php-openapi/yii2-openapi/issues/68
276
278
$ refCounter = 0 ;
277
- foreach ($ allOfs as $ allOf ) {
278
- if (isset ( $ allOf[ ' $ref ' ]) ) {
279
+ foreach ($ allOfsInSchema as $ allOf ) {
280
+ if ($ allOf instanceof Reference ) {
279
281
$ refCounter ++;
280
282
}
281
283
}
You can’t perform that action at this time.
0 commit comments