From 8d7af763ad3bdc894702df173218d30f0daf3f47 Mon Sep 17 00:00:00 2001 From: Erayd Date: Wed, 4 Oct 2017 13:46:54 +1300 Subject: [PATCH] Don't resolve a schema id against itself --- src/JsonSchema/SchemaStorage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/JsonSchema/SchemaStorage.php b/src/JsonSchema/SchemaStorage.php index 58650cd9..6e75ec17 100644 --- a/src/JsonSchema/SchemaStorage.php +++ b/src/JsonSchema/SchemaStorage.php @@ -92,7 +92,7 @@ private function expandRefs(&$schema, $base = null) return; } - if (property_exists($schema, 'id') && is_string($schema->id)) { + if (property_exists($schema, 'id') && is_string($schema->id) && $base != $schema->id) { $base = $this->uriResolver->resolve($schema->id, $base); }