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
Currently, there is support for Backed Enum in Entity that is creating component and referencing it in in open api specification.
But when adding EnumType in symfony form, it's specified as simple enum and not a reusable component, same as ChoiceType, and this is creating a lot of duplicate enum types when generating api clients, one per each form where it's used.
I guess the update should be happening here (but i'm not sure).
Current State:
Enum:
enum ExampleEnum: string
{
case ONE = 'one';
case TWO = 'two';
case THREE = 'three';
}
The text was updated successfully, but these errors were encountered:
nikola-jovanovic-php
changed the title
Add support for Backed Enum as model in Synfony Forms
Add support for Backed Enum as model in Symfony Forms
May 29, 2023
Currently, there is support for Backed Enum in Entity that is creating component and referencing it in in open api specification.
But when adding EnumType in symfony form, it's specified as simple enum and not a reusable component, same as ChoiceType, and this is creating a lot of duplicate enum types when generating api clients, one per each form where it's used.
I guess the update should be happening here (but i'm not sure).
Current State:
Enum:
Form:
generated specs:
Requested state and wanted changes:
or if form field is array of enums (
multiple = true
):The text was updated successfully, but these errors were encountered: