Skip to content
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

Fix error when extracting examples (#2789) #2922

Merged
merged 1 commit into from
Jun 24, 2024

Conversation

987Nabil
Copy link
Contributor

@987Nabil 987Nabil commented Jun 20, 2024

@jdegoes this is a fix, but seems fishy.
I debugged and realised, that we have in the changed line an alternator of type right empty. Which comes from the call of outCodec. This is correct, since the type of out before is empty. But the example value is wrapped in a left it needs to be unwrapped. Which only happens for an either alternator. Maybe you have an idea what could go wrong here?

@jdegoes I found the actual issue. The def | only throw aways an incoming HttpCodec.Halt, but it needs to ignore self if it is HttpCodec.Halt as well.

Question:
Does it make more sense to check self eq Halt or override def | for Halt?

fixes #2789
/claim #2789

@987Nabil 987Nabil marked this pull request as ready for review June 20, 2024 15:27
@jdegoes jdegoes merged commit a98ed32 into zio:main Jun 24, 2024
93 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression - OpenAPIGen breaks with String output examples
2 participants