Kotlin - jackson support in the asyncapi cli
Why do we need this improvement?
As Kotlin user, would appreciate to have the jackson validation support on Kotlin language just like Java support (--javaJackson) so that we can use Kotlin generated classes rather than Java
How will this change help?
It will help Kotlin users to have validation on asyncapi generated models
Screenshots
No response
How could it be implemented/designed?
Having another flag in the asyncapi generate model to support Kotlin jackson, something like --kotlinJackson
🚧 Breaking changes
No
👀 Have you checked for similar open issues?
- [x] I checked and didn't find a similar issue
🏢 Have you read the Contributing Guidelines?
- [x] I have read the Contributing Guidelines
Are you willing to work on this issue?
None
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Hi @derberg, are we planning to support this? I’d like to work on it if it’s available. Just wanted to confirm before I start.
@ahmetcetin39 makes sense but just fyi, CLI is a project that integrates different libraries that serve different goal. So asyncapi generate model uses https://github.com/asyncapi/modelina. Enabling --kotlinJackson is easy as long as modelina supports it
Hey@derberg ,
### My understanding: Kotlin users currently don’t have Jackson-based validation support when generating models via the AsyncAPI CLI, unlike Java (--javaJackson). Since the CLI relies on Modelina for model generation, adding Kotlin Jackson support depends on Modelina exposing this capability.
### My approach: I would like to first look into Modelina’s support for Kotlin + Jackson (related issue: asyncapi/modelina#2398), and then wire that support into the CLI via a new flag (e.g. --kotlinJackson) if feasible. This would allow Kotlin users to validate generated models in the same way Java users can.
If this approach sounds reasonable, may I proceed with a PR?