You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I implemented a Symfony normalizer that supports normalizing / denormalizing enum by their name when adding a #[Context('_nelmio_enum_force_names' => true)] attribute and I'm trying to get nelmio to generate a model with type = string and using the enum names for the values in this case.
I created an EnumModelDescriber that does the same thing as the one in NelmioBundleDocBundle but also acceptd UnitEnum when _nelmio_enum_force_names is true in the serialization context. But the context is empty even if I add the #[Context('_nelmio_enum_force_names' => true)] attribute on the property holding the enum.
Is this expected?
Additional context
No response
The text was updated successfully, but these errors were encountered:
Thank you for the reply @DjordyKoert . I see you labeled that as a good first issue. Depending on how much time it requires I may take a try at it. If you already know how it should be implemented, do you mind giving me some guideline / hints? 🙏
And then call ClassMetadataInterface->getAttributesMetadata() which returns array<string, AttributeMetadataInterface> with the key assuming to be the property name.
Version
4.33.4
Question
I implemented a Symfony normalizer that supports normalizing / denormalizing enum by their name when adding a
#[Context('_nelmio_enum_force_names' => true)]
attribute and I'm trying to get nelmio to generate a model with type =string
and using the enum names for the values in this case.I created an EnumModelDescriber that does the same thing as the one in NelmioBundleDocBundle but also acceptd UnitEnum when
_nelmio_enum_force_names
is true in the serialization context. But the context is empty even if I add the#[Context('_nelmio_enum_force_names' => true)]
attribute on the property holding the enum.Is this expected?
Additional context
No response
The text was updated successfully, but these errors were encountered: