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

Generating OpenAPI spec (OAS) along with CRD #808

Open
SantoshKumar4 opened this issue May 5, 2023 · 5 comments
Open

Generating OpenAPI spec (OAS) along with CRD #808

SantoshKumar4 opened this issue May 5, 2023 · 5 comments

Comments

@SantoshKumar4
Copy link

SantoshKumar4 commented May 5, 2023

Looking for suggestions.
I am generating Kubernetes CRD (Custom Resource Definition) using kubebuilder. Along with CRD, I also need to document the REST endpoints by creating OpenAPI v3 Spec (OAS) file. Is there a way to get this done using controller-gen? (I see that kubebuilder uses controller-gen to create the CRD) and it was recommended to ask the question in this space). I tried exploring +schemapatch generator but felt like it's there for a different reason.

I also want to add sample Request/Response payload and other OpenAPI details (in <>types.go file) to generate complete OAS file.
The reason I want to use types.go file as I will have just one source of truth and I don't need to manually write/edit the OAS file.

Any other way would you recommend if controller-gen is not the right tool for this.

Thanks in advance.

@EronWright
Copy link

Related: kubernetes-sigs/kubebuilder#1231

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please 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 Jan 22, 2024
@camilamacedo86
Copy link
Member

Also, see the markers for validation: https://book.kubebuilder.io/reference/markers/crd-validation

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle rotten
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 21, 2024
@khaled
Copy link

khaled commented Feb 21, 2024

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants