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'm struggling with having Request Body as DTO, where one of it's attributes is array of objects or native enums.
In this case, nelmio renders correctly the scheme, but is unable to create the examples.
I'd expect it to be able to get enum value and use one of it as example.
Is this functionality supported or not ? Thank you.
Additional context
/**
* @param Role[] $permissions
*/
public function __construct(
#[Assert\NotBlank]
public string $displayName,
#[Assert\NotBlank(allowNull: true)]
public ?string $description,
#[Assert\NotBlank]
public EntityId $parent,
#[Assert\Valid]
public array $permissions = [],
) {
}
enum Role: string
{
case ROLE_ADMIN = 'ROLE_ADMIN';
}
The text was updated successfully, but these errors were encountered:
Version
4.36.1
Question
I'm using Symfony 7.1. and NelmioApiDocBundle.
I'm struggling with having Request Body as DTO, where one of it's attributes is array of objects or native enums.
In this case, nelmio renders correctly the scheme, but is unable to create the examples.
I'd expect it to be able to get enum value and use one of it as example.
Is this functionality supported or not ? Thank you.
Additional context
The text was updated successfully, but these errors were encountered: