Closed jiria closed 3 years ago
Hi @jiria
There are 2 methods to re-run the openapi generator.
The official method:
use the script in https://github.com/kubernetes-client/gen
with the configuration https://github.com/kubernetes-client/c/blob/master/settings
After you get the kubernets API specification "swagger.json" by the method 1 you can re-run openapi-generator by this command in openapi-generator directory.
mvn clean package
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ${kubernetes-client-c-dir}/kubernetes/swagger.json -g c -o ../kubernetes-client-c --skip-validate-spec
You can try it for your case. I have not test for CRD yet. Welcome PR to support CRD!
Hi @brendandburns
Do we support to add user's CRD openapi/swagger spec to the swagger.json? by manual or by kubernetes-client/gen ?
Or users only can create/query/update/delete CustomResourceDefinition by kuberntes-client/c They need handle their own CRD model/api by their application ?
Hi @jiria
These 2 files maybe useful for you to try.
https://github.com/kubernetes-client/c/blob/master/kubernetes/api/CustomObjectsAPI.h https://github.com/kubernetes-client/c/blob/master/kubernetes/api/CustomObjectsAPI.c
There are example instructions here: https://github.com/kubernetes-client/java/blob/master/docs/generate-model-from-third-party-resources.md
For the Java client, we could do something similar for C
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale
This defect traces the client for CRD.
Thank you for the pointers. I had to switch to the C# SDK due to existing dependencies, so did not really get too far here. But I hope other folks will find this useful as well. Not closing in case you want to track this further.
The best method to support CRD is generic client now.
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale
.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close
.
Send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale
/close
@ityuhui: Closing this issue.
Hello,
Can you please provide instructions/script on rerunning the openapi generator? Specifically, trying to target some CRDs with the C client.