Add support for serializing identifiers in PersonJsonNormalizer and improve PersonIdentifier entity serialization.

- Extended `PersonJsonNormalizer` to include `identifiers` field normalization.
- Added `Serializer` annotations to `PersonIdentifier` and `PersonIdentifierDefinition` for enhanced serialization support.
- Updated `PersonIdentifier` and `PersonIdentifierDefinition` to define serialization groups and discriminator maps.
This commit is contained in:
2025-10-29 15:04:50 +01:00
parent e291c7abec
commit 8c2acbd166
4 changed files with 11 additions and 1 deletions

View File

@@ -69,6 +69,7 @@ class PersonJsonNormalizer implements NormalizerAwareInterface, NormalizerInterf
'gender' => $this->normalizer->normalize($person->getGender(), $format, $context),
'civility' => $this->normalizer->normalize($person->getCivility(), $format, $context),
'personId' => $this->personIdRendering->renderPersonId($person),
'identifiers' => $this->normalizer->normalize($person->getIdentifiers(), $format, $context),
];
if (\in_array('minimal', $groups, true) && 1 === \count($groups)) {