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] go generator is unable to handle unions types correctly. #1842

Closed
2 tasks done
Souvikns opened this issue Feb 28, 2024 · 1 comment · Fixed by #1848
Closed
2 tasks done

[BUG] go generator is unable to handle unions types correctly. #1842

Souvikns opened this issue Feb 28, 2024 · 1 comment · Fixed by #1848
Labels
bug Something isn't working released on @next

Comments

@Souvikns
Copy link
Member

Describe the bug.

Go generator cannot generate models for types that could be two separate types simultaneously, for example, a servers object that could be a list of server objects or a reference object.

Expected behavior

Go generator can generate models that support union types or replicate the functionality of union types in golang, with respect to what is possible in golang.

Screenshots

Screenshot 2024-02-28 at 2 39 22 PM

servers could be a reference type as well.

How to Reproduce

use modelina to generate models for the AsyncAPI JSON scheme

🥦 Browser

Mozilla Firefox

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

@Souvikns Souvikns added the bug Something isn't working label Feb 28, 2024
@Souvikns Souvikns changed the title [BUG] go generator is unable to handle unions correctly. [BUG] go generator is unable to handle unions types correctly. Feb 28, 2024
@jonaslagoni jonaslagoni reopened this Mar 11, 2024
@asyncapi-bot
Copy link
Contributor

🎉 This issue has been resolved in version 4.0.0-next.26 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released on @next
Projects
None yet
3 participants