Skip to content
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

Instructions to running openapi generator #8

Closed
jiria opened this issue Apr 3, 2020 · 11 comments
Closed

Instructions to running openapi generator #8

jiria opened this issue Apr 3, 2020 · 11 comments
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@jiria
Copy link

jiria commented Apr 3, 2020

Hello,

Can you please provide instructions/script on rerunning the openapi generator? Specifically, trying to target some CRDs with the C client.

@ityuhui
Copy link
Member

ityuhui commented Apr 3, 2020

Hi @jiria

There are 2 methods to re-run the openapi generator.

  1. 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

  2. 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!

@ityuhui
Copy link
Member

ityuhui commented Apr 3, 2020

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 ?

@brendandburns
Copy link
Contributor

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

@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 7, 2020
@ityuhui
Copy link
Member

ityuhui commented Sep 7, 2020

/remove-lifecycle stale

This defect traces the client for CRD.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 7, 2020
@jiria
Copy link
Author

jiria commented Sep 10, 2020

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.

@ityuhui
Copy link
Member

ityuhui commented Oct 21, 2020

The best method to support CRD is generic client now.

@ityuhui ityuhui added the kind/feature Categorizes issue or PR as related to a new feature. label Dec 11, 2020
@fejta-bot
Copy link

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

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 11, 2021
@ityuhui
Copy link
Member

ityuhui commented Mar 11, 2021

/close

@k8s-ci-robot
Copy link
Contributor

@ityuhui: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants