add id to docgen normalization fo a person

This commit is contained in:
2022-03-03 15:01:14 +01:00
parent 3df2335cf4
commit bf4a3a2c91
2 changed files with 3 additions and 1 deletions

View File

@@ -74,6 +74,7 @@ class PersonDocGenNormalizer implements
$data = [
'type' => 'person',
'id' => $person->getId(),
'isNull' => false,
'civility' => $this->normalizer->normalize($person->getCivility(), $format, array_merge($context, ['docgen:expects' => Civility::class])),
'firstName' => $person->getFirstName(),
@@ -151,7 +152,7 @@ class PersonDocGenNormalizer implements
$normalizer = new NormalizeNullValueHelper($this->normalizer, 'type', 'person');
$attributes = [
'firstName', 'lastName', 'age', 'altNames', 'text',
'id', 'firstName', 'lastName', 'age', 'altNames', 'text',
'civility' => Civility::class,
'birthdate' => DateTimeInterface::class,
'deathdate' => DateTimeInterface::class,