-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enum constraints are not added to response objects #608
Comments
@manuel-watchenterprise what is the expected result here? |
you need to specify the value enum MaritalEnum: string
{
case Married = "Married";
case Single = "Single";
case Widow = "Widow";
case Widowr = "Widowr";
} $this->mergeWhen(collect($this->resource)?->get('marital') != null, [
/** @var MaritalEnum */
'marital' => collect($this->resource)?->get('marital'),
]) |
@ikhbaaalll thank you, I do appreciate. I could easily and quickly refactor my non-backed enums, I might will do that, but I believe these have to be handled. It's personal taste, but having backed enum just to have identical string value assigned to |
Enum constraints (not backed!) are working fine for request objects, however, are not added to responses. Backed enums are working fine in responses as well.
The text was updated successfully, but these errors were encountered: