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

Regression in recursive data types derivation #401

Open
ghostbuster91 opened this issue May 15, 2022 · 0 comments
Open

Regression in recursive data types derivation #401

ghostbuster91 opened this issue May 15, 2022 · 0 comments

Comments

@ghostbuster91
Copy link
Contributor

ghostbuster91 commented May 15, 2022

Hi,

case class F1(data: Option[F1])

val endpoint_wit_recursive_structure: 
     Endpoint[Unit, Unit, Unit, Option[F1], Any] = 
     endpoint.out(jsonBody[Option[F1]])

Above code fails to properly derive Schema typeclass for tapir using instead a default magnolia fallback that treats Option as a coproduct. This only happens when the inner container matches the outer container, i.e. not when we have jsonBody[List[F1]].

This was already reported and fixed in the past under #178

Additional info:

  • "com.softwaremill.magnolia1_2" %%% "magnolia" % "1.1.2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant