@@ -31,14 +31,14 @@ class Schema extends ObjectItem
31
31
32
32
/*
33
33
public $__seqId;
34
+ public static $seq = 0;
34
35
35
36
public function __construct()
36
37
{
37
- static $seq = 0;
38
- $seq++;
39
- $this->__seqId = $seq;
38
+ self::$seq++;
39
+ $this->__seqId = self::$seq;
40
40
}
41
- */
41
+ // */
42
42
43
43
/** @var Type */
44
44
public $ type ;
@@ -392,14 +392,17 @@ public function process($data, ProcessingOptions $options, $path = '#', $result
392
392
});
393
393
$ ref = $ options ->refResolver ->resolveReference ($ refString );
394
394
if ($ ref ->isImported ()) {
395
- return $ ref ->getImported ();
395
+ $ refResult = $ ref ->getImported ();
396
+ return $ refResult ;
396
397
}
397
398
$ data = $ ref ->getData ();
398
399
if ($ result instanceof Schema) {
399
400
$ result ->fromRef = $ refString ;
400
401
}
401
402
$ ref ->setImported ($ result );
402
- return $ this ->process ($ data , $ options , $ path . '->ref: ' . $ refString , $ result );
403
+ $ refResult = $ this ->process ($ data , $ options , $ path . '->ref: ' . $ refString , $ result );
404
+ $ ref ->setImported ($ refResult );
405
+ return $ refResult ;
403
406
}
404
407
} catch (InvalidValue $ exception ) {
405
408
$ this ->fail ($ exception , $ path );
@@ -507,7 +510,7 @@ public function process($data, ProcessingOptions $options, $path = '#', $result
507
510
$ this ->fail (new ObjectException ('Additional properties not allowed ' ), $ path . ': ' . $ key );
508
511
}
509
512
510
- $ value = $ this ->additionalProperties ->process ($ value , $ options , $ path . '->additionalProperties ' );
513
+ $ value = $ this ->additionalProperties ->process ($ value , $ options , $ path . '->additionalProperties: ' . $ key );
511
514
if ($ import && !$ this ->useObjectAsArray ) {
512
515
$ result ->addAdditionalPropertyName ($ key );
513
516
}
0 commit comments