Skip to content

Allow java-generator-maven-plugin reuse an existing enum #7045

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

Open
k-wall opened this issue Apr 30, 2025 · 0 comments
Open

Allow java-generator-maven-plugin reuse an existing enum #7045

k-wall opened this issue Apr 30, 2025 · 0 comments

Comments

@k-wall
Copy link
Contributor

k-wall commented Apr 30, 2025

Is your enhancement related to a problem? Please describe

I am using CRD -> Java POJO.

In my API, I have the same enumeration appear in several places in the model (across several CRDs). Currently java-generator-maven-plugin creates an enumeration for each each instance, even though, the resulting code is the same. This makes for awkward code.

java-generator-maven-plugin's existingJavaTypes allows you to tell the plugin to reuse an existing Java class, but unfortunately, it does not support Java Enums.

Relates to: #7015

Describe the solution you'd like

An extension to the existingJavaTypes feature to support enums.

Describe alternatives you've considered

No response

Additional context

No response

k-wall added a commit to k-wall/kubernetes-client that referenced this issue Apr 30, 2025
k-wall added a commit to k-wall/kubernetes-client that referenced this issue Apr 30, 2025
k-wall added a commit to k-wall/kubernetes-client that referenced this issue Apr 30, 2025
k-wall added a commit to k-wall/kubernetes-client that referenced this issue May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant