Skip to content

Commit af5478d

Browse files
committed
Add *Of properties to RefResolver
The RefResolver currently skips any part of the schema that contains 'allOf', 'anyOf' or 'oneOf'. This prevents proper resolving of references ($ref) that are inside of an array that is part of the above mentioned properties. Add the three property names to the array that is used to execute resolveArrayOfSchemas().
1 parent 22d97c2 commit af5478d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/JsonSchema/RefResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public function resolve($schema, $sourceUri = null)
116116
// These are all potentially arrays that contain schema objects
117117
// eg. type can be a value or an array of values/schemas
118118
// eg. items can be a schema or an array of schemas
119-
foreach (array('disallow', 'extends', 'items', 'type') as $propertyName) {
119+
foreach (array('disallow', 'extends', 'items', 'type', 'allOf', 'anyOf', 'oneOf') as $propertyName) {
120120
$this->resolveArrayOfSchemas($schema, $propertyName, $sourceUri);
121121
}
122122

0 commit comments

Comments
 (0)