-
Notifications
You must be signed in to change notification settings - Fork 152
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
Generated Models for Java have Invalid code #253
Comments
Ah, this is due to https://github.com/kubernetes-client/java/blob/master/kubernetes/.openapi-generator-ignore#L10 I believe that hold is no longer necessary. Can you try removing that line? |
So that did fix my compilation issue. I commented out the line you mentioned and ran the generation as described here. I then did a Alot of the the other subprojects in java project are failing though. I attempted to fix the compilation issues and skip some of the test but then I got to a point where If anyone wants to look at my fork it's here: https://github.com/jrshaffe/java/tree/jrshaffe/fixOpenAPIGeneration |
What version of the Kubernetes API are you using? The existing codebase is pointed at I'm in the process of regenerating the common Java client, so I will probably run into these problems and debug. You might also try regenerating at this commit: Which is before we rev'd the openapi code generator from 4.x to 6.x |
I was using 1.27
Thanks! Using that commit worked for us. |
Hi 👋 I see the was a
If anyone knows how to update the fluent modules, I can create a PR with the updated client. |
Ping @brendandburns back on this. There seems to be no way to use the generator right now until everything moves up a step and this JSON thing gets fixed. |
I was able to get something working just for my CRDs from master (84f2bc9) by discarding the The issue still remains though in the published containers and docs, and probably the fluent modules issue that @abelsromero mentioned. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues. This bot triages un-triaged issues according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
When I run the generation for java I am getting code that doesn't compile. The errors all say
It looks like the following methods are being added to my all my models and
JSON is referring to
io.kubernetes.client.openapi.JSON
and that method is defined as follows:
https://github.com/kubernetes-client/java/blob/master/kubernetes/src/main/java/io/kubernetes/client/openapi/JSON.java#L120-L122.
I noticed that the JSON.java file looks like it wasn't updated at the same time as the other files in there. All the other ones say there were Automated from openapi generation release 1.27. Not sure if that helps at all.
The text was updated successfully, but these errors were encountered: