Skip to content

Commit 8485465

Browse files
authored
Merge pull request #81 from swaggest/strict-dereference
Strict dereference
2 parents 23b6709 + 67b5f3b commit 8485465

File tree

4 files changed

+1850
-4
lines changed

4 files changed

+1850
-4
lines changed

src/Schema.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ private function processObject($data, Context $options, $path, $result = null)
663663
try {
664664

665665
$refProperty = null;
666-
$dereference = true;
666+
$dereference = false;
667667

668668
if ($this->properties !== null && isset($array[self::PROP_REF])) {
669669
$refPropName = self::PROP_REF;
@@ -675,8 +675,8 @@ private function processObject($data, Context $options, $path, $result = null)
675675

676676
$refProperty = $this->properties[$refPropName];
677677

678-
if (isset($refProperty) && ($refProperty->format !== Format::URI_REFERENCE)) {
679-
$dereference = false;
678+
if (isset($refProperty) && ($refProperty->format === Format::URI_REFERENCE)) {
679+
$dereference = true;
680680
}
681681
}
682682

@@ -733,7 +733,6 @@ private function processObject($data, Context $options, $path, $result = null)
733733
}
734734
$refResult->setFromRef($refString);
735735
}
736-
$ref->setImported($refResult);
737736
$options->skipValidation = $skipValidation;
738737

739738
if ($result instanceof WithResolvedValue) {

0 commit comments

Comments
 (0)