We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
3.13.1
Reproduction on Effect playground: https://effect.website/play#bfe492b50bb7
I define an HttpApi like this:
const MyApi = HttpApi.make("api").add( HttpApiGroup.make("group").add( HttpApiEndpoint.get("endpoint")`/`.setUrlParams( Schema.Struct({ enum: Schema.Enums(TestEnum), date: Schema.optionalWith(Schema.Date, { exact: true }) }) ).addSuccess(Schema.String) ) )
When calling my endpoint using the client, I see this error:
HttpApiDecodeError: { readonly enum: <enum 2 value(s): 0 | 1>; readonly date?: Date } └─ ["enum"] └─ Expected <enum 2 value(s): 0 | 1>, actual ["first"]
It should decode the enum correctly
No response
The bug is not present on @effect/platform 0.75.4, but is present on the version 0.77.1.
I guess that it could be linked to this recent commit @gcanti from c407726
The text was updated successfully, but these errors were encountered:
Add support for Schema.Enums in HttpApiBuilder.isSingleStringType, …
Schema.Enums
HttpApiBuilder.isSingleStringType
c5f3e6f
…closes #4471
31be72a
@wewelll thanks for reporting, patch released
Sorry, something went wrong.
gcanti
Successfully merging a pull request may close this issue.
What version of Effect is running?
3.13.1
What steps can reproduce the bug?
Reproduction on Effect playground: https://effect.website/play#bfe492b50bb7
I define an HttpApi like this:
When calling my endpoint using the client, I see this error:
What is the expected behavior?
It should decode the enum correctly
What do you see instead?
No response
Additional information
The bug is not present on @effect/platform 0.75.4, but is present on the version 0.77.1.
I guess that it could be linked to this recent commit @gcanti from c407726
The text was updated successfully, but these errors were encountered: