modelina
modelina copied to clipboard
Add Jackson annotations and a preset to the Kotlin generator
Reason/Context
As of now there is no official support for JSON (de-)serialization with the Kotlin models provided by Modelina. While most models will work just fine, there are more than enough cases where a user would like to add Jackson annotation to obtain a higher level of control over the whole process.
Description
We need to add Jackson annotations, a way to configure them and a sensible preset to apply them. It will most likely not require a breaking change to implement this, since it is purely additive.
Since Java generator has implemented this already, it would probably be a good idea to look there for inspiration. Implementation will most likely be similar.
Also, here's an interesting SO post about Jackson annotations. https://stackoverflow.com/questions/47982148/usage-of-jackson-jsonproperty-annotation-for-kotlin-data-classes (Tip: use @get
)
Scope
This might sound a bit cheap, but aim for at least what the Java Generator already does.
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
@jonaslagoni is this still valid?
@AnimeshKumar923 it is yea :+1:
Here is the recipe how to achieve it:
- Follow this guide how to add the preset for Jackson: https://github.com/asyncapi/modelina/blob/master/docs/contributing.md#adding-a-new-preset
- Get inspiration from the Java Jackson preset: https://github.com/asyncapi/modelina/blob/master/src/generators/java/presets/JacksonPreset.ts
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart: