Forum Discussion
Hey zur --
I have hit similar issues and couple of things you can try:
1. Changing the generator and possibly using OpenAPI (I have heard the Native Generator: https://openapi-generator.tech/docs/generators/java works the best)
2. My team has been working on a Swagger alternative that really focuses on codegen (as Swagger was initially built for docs) and we are calling it Fern. Check it out here.
In Fern you can represent the issuer like this:
Issuer:
union:
stringIssuer: string
objectIssuer: ObjectIssuer
ObjectIssuer:
fields:
id: string
and it will codegen the classes you want. Demo video here. Apologies if this wasn't the answer you are looking for but I have run into many issues with codegen in the Swagger ecosystem and using an alternative feels like the best solution.
Thank you for the response. I will suggest evaluation of the framework. But it may not be adopted currently. Thank you for your help.
- dsinghvi773 years agoOccasional Contributor
No worries! We hang out in https://discord.gg/JkkXumPzcG if you ever need other help or want to test out Fern.
Related Content
- 2 years ago
Recent Discussions
- 10 days ago
- 16 days ago