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

[BUG] semiauto schema derivation looses generic type #3922

Open
lgmyrek opened this issue Jul 10, 2024 · 1 comment
Open

[BUG] semiauto schema derivation looses generic type #3922

lgmyrek opened this issue Jul 10, 2024 · 1 comment

Comments

@lgmyrek
Copy link

lgmyrek commented Jul 10, 2024

Tapir version: 1.10.12

Scala version: 2.13.14

Describe the bug
semi-auto derived schemas loose generic type, it fallbacks to placeholder eg. A which causes schema mixup.

How to reproduce?
context: https://softwaremill.community/t/why-subtypenametoschemaname-in-schema-derivation-always-recalculates-snames/409/5

Additional information

@adamw
Copy link
Member

adamw commented Aug 7, 2024

This might be quite challenging to fix, as I think Magnolia derives the schema for AdtTree[A], without knowing the specific parameter names. The schema is then reused. Maybe if we implement a custom schema derivation macro, we'd be able to resolve this 🤔

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

2 participants