-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Support for javaType and existingJavaType extensions in java-generator #5844
Conversation
e76a2d3
to
e5e09ba
Compare
cc. @iocanel this might help with classes deduplication you have been asking for. The downside is that, with this approach, you need to be in control of the CRDs ... still seems like a low effort way to start to close the gap. |
ebdad5f
to
5207b13
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matteriben thanks a lot for starting this effort, I added some notes but I'm supportive to this effort 👍
I have a couple of additional questions:
- I'm not 100% convinced about having 2 different options, I think that
existingJavaType
is enough for 90% of the real-world use cases. Applying the Okkam razor we should only keep one, happy to be convinced otherwise though 🙂 - I'm interested in exploring(we can do this in a follow-up PR) how to achieve the same result without touching the original CRD, e.g. using a
java-generator
configuration option. It doesn't need to be super "easy" as it's an advanced usage, maybe re-using a logic similar topackageOverride
?
Happy to have @manusa feedback here 🙏
java-generator/core/src/main/java/io/fabric8/java/generator/nodes/AbstractJSONSchema2Pojo.java
Outdated
Show resolved
Hide resolved
java-generator/core/src/main/java/io/fabric8/java/generator/nodes/AbstractJSONSchema2Pojo.java
Outdated
Show resolved
Hide resolved
java-generator/core/src/main/java/io/fabric8/java/generator/nodes/AbstractJSONSchema2Pojo.java
Outdated
Show resolved
Hide resolved
...ons/src/generated/java/io/fabric8/kubernetes/api/model/apiextensions/v1/JSONSchemaProps.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @matteriben !
You already covered every aspect of it 🙂 the DX is(as expected) a little clunky but the functionality is there 👍
I would say that this fixes #5619 too.
LGTM!
f8a8025
to
2cd8fb4
Compare
3cef873
to
d62e26a
Compare
@matteriben sorry for the delay, please resolve the conflicts with the changelog and I'll do a final review and eventually merge tomorrow morning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for the delay and thanks a lot for this effort, really appreciated!
Great job here 👍
LGTM
@@ -64,6 +66,7 @@ public Config( | |||
} | |||
} | |||
|
|||
@Deprecated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tnx 👍
As the CI is failing on OpenShift I'm unable to merge this PR, would you mind pressing the button @manusa ? |
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx!
Support javaType and existingJavaType extensions in java-generator
Fix #5860
Type of change
test, version modification, documentation, etc.)
Checklist