@@ -31,14 +31,14 @@ class Schema extends ObjectItem
3131
3232 /*
3333 public $__seqId;
34+ public static $seq = 0;
3435
3536 public function __construct()
3637 {
37- static $seq = 0;
38- $seq++;
39- $this->__seqId = $seq;
38+ self::$seq++;
39+ $this->__seqId = self::$seq;
4040 }
41- */
41+ // */
4242
4343 /** @var Type */
4444 public $ type ;
@@ -392,14 +392,17 @@ public function process($data, ProcessingOptions $options, $path = '#', $result
392392 });
393393 $ ref = $ options ->refResolver ->resolveReference ($ refString );
394394 if ($ ref ->isImported ()) {
395- return $ ref ->getImported ();
395+ $ refResult = $ ref ->getImported ();
396+ return $ refResult ;
396397 }
397398 $ data = $ ref ->getData ();
398399 if ($ result instanceof Schema) {
399400 $ result ->fromRef = $ refString ;
400401 }
401402 $ 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 ;
403406 }
404407 } catch (InvalidValue $ exception ) {
405408 $ this ->fail ($ exception , $ path );
@@ -507,7 +510,7 @@ public function process($data, ProcessingOptions $options, $path = '#', $result
507510 $ this ->fail (new ObjectException ('Additional properties not allowed ' ), $ path . ': ' . $ key );
508511 }
509512
510- $ value = $ this ->additionalProperties ->process ($ value , $ options , $ path . '->additionalProperties ' );
513+ $ value = $ this ->additionalProperties ->process ($ value , $ options , $ path . '->additionalProperties: ' . $ key );
511514 if ($ import && !$ this ->useObjectAsArray ) {
512515 $ result ->addAdditionalPropertyName ($ key );
513516 }
0 commit comments