-
Notifications
You must be signed in to change notification settings - Fork 148
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
Chore: Migrate java clients from swagger-codegen to openapi-generator #117
Chore: Migrate java clients from swagger-codegen to openapi-generator #117
Conversation
@yue9944882 the last time I tried this, it broke a bunch of stuff because the Before we do this switch, I want to see the PR that it generates for the Java repo.... Thanks |
@brendandburns i also tried locally but didn't other surprises except for bunch of underlying dependency switching (not sure if it's breaking backward-compatibility). sure i will sent a pull in the repo to reflect the generator changes. |
To be clear it was the custom mappings like you added in #118 that broke. So if those continue to work correctly, then this LGTM. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
e902edc
to
b86b651
Compare
7120c2a
to
4c7842c
Compare
openapi/java.xml
Outdated
<import-mappings> | ||
IntOrString=io.kubernetes.client.custom.IntOrString,Quantity=io.kubernetes.client.custom.Quantity,V1Patch=io.kubernetes.client.custom.V1Patch | ||
</import-mappings> | ||
<typeMappings>int-or-string=IntOrString,quantity=Quantity</typeMappings> |
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.
@wing328 for help
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.
How can I help? Can you share more details with me?
4c7842c
to
9eb23c0
Compare
As discussed over IM, please use the latest stable version v4.1.3 instead as the string's format support together with type mapping is only added in recent versions. |
</configOptions> | ||
<typeMappings>int-or-string=IntOrString,quantity=Quantity</typeMappings> |
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.
@yue9944882 I noticed that you've added https://github.com/kubernetes-client/gen/pull/117/files#diff-4b08c5154861f4aefe8a9bc110c4a15bR155 to map quantity to Quantity so I think we can remove ,quantity=Quatity
here (but I've not tested it)
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.
this is still necessary. The code you linked is patching the swagger spec to add a format field to the Quantity
definition, so we can install a custom mapping here.
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.
👌
9eb23c0
to
08c85f1
Compare
add reflection-equality config option java: update openapi generator to 4.1.2 patch openapi-generator, format Quantity Bring in a patched openapi-generator temporarily until openapi-generator#4182 gets merged, and add a format to resource.Quantity so it can have a custom typeMapping installed. Also bring configuration of type and import mappings to the correct (newer) format for the maven plugin. remove the overrides refactor openapi-gen generator 4.1.3 4.2.0
08c85f1
to
bf04565
Compare
@yue9944882 is this up to date? Now that we've merged the code changes in the java repo, I'd like to merge the corresponding generation code. Thanks! |
yes, this is in ready state |
/hold cancel @brendandburns for merging |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, yue9944882 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @brendandburns
/hold
(until 5.0.0 released)
note that this pull will involve some critical dependency changes in the java repo.