function SchemaStorage::resolveRefSchema
Overrides SchemaStorageInterface::resolveRefSchema
1 call to SchemaStorage::resolveRefSchema()
- SchemaStorage::resolveRef in vendor/
justinrainbow/ json-schema/ src/ JsonSchema/ SchemaStorage.php - Returns schema for given reference with all sub-references resolved
File
-
vendor/
justinrainbow/ json-schema/ src/ JsonSchema/ SchemaStorage.php, line 159
Class
Namespace
JsonSchemaCode
public function resolveRefSchema($refSchema) {
if (is_object($refSchema) && property_exists($refSchema, '$ref') && is_string($refSchema->{'$ref'})) {
$newSchema = $this->resolveRef($refSchema->{'$ref'});
$refSchema = (object) (get_object_vars($refSchema) + get_object_vars($newSchema));
unset($refSchema->{'$ref'});
}
return $refSchema;
}