asyncapi / asyncapi/modelina

Java & Kotlin - type mapping support in the asyncapi cli

Open
#2,397 4 comments 1 reaction 0 assignees View on GitHub
enhancement stale
Dominant language
TypeScript
Stars
448
Forks
242
Avg merge
15m
Merged PRs (30d)
7

Description

### Why do we need this improvement?

As Kotlin user, would appreciate to have the data mapping support so that I could map type such as Double -> BigDecimal to avoid possible side-effects.
Double -> BigDecimal is the only issue with type mapping we had, but considering other users might have different use cases, I am creating the ticket for general type mapping.

### How will this change help?

It will help Java & Kotlin users to have type mapping so they don't need to use default mapping of types.

### Screenshots

_No response_

### How could it be implemented/designed?

Having another flag in the `asyncapi generate model` to support type mapping, something like `--kotlinTypeMapping`

### 🚧 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](https://github.com/asyncapi/.github/blob/master/CONTRIBUTING.md)

### Are you willing to work on this issue?

None

Contributor guide

Open the contributing guide

Research direction

Start at the `asyncapi generate model` CLI entry point and inspect how Java and Kotlin generators currently select default types. Define the mapping option and verify Double → BigDecimal plus other custom mappings through generator tests; done means both targets accept mappings without changing default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin, typescript
Domain
cli, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.