public function denormalize($data, $class, $format = null, array $context = [])
{
if (isset($data->{'$ref'})) {
return new Reference($data->{'$ref'}, $context['rootSchema'] ?: null);
}
$object = new \Joli\Jane\OpenApi\Model\BasicAuthenticationSecurity();
if (!isset($context['rootSchema'])) {
$context['rootSchema'] = $object;
}
if (property_exists($data, 'type')) {
$object->setType($data->{'type'});
}
if (property_exists($data, 'description')) {
$object->setDescription($data->{'description'});
}
return $object;
}