diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index ca4e5b33b5..580e62c38e 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -142,6 +142,12 @@ $ export GOROOT=$(go env GOROOT) This will work for the current environment. To persist this fix, add the above line to your environment's config file, ex. `bashrc` file. +## How do I generate OpenAPI Go source files for my APIs? +It is recommended to use [openapi-gen][openapi-gen] for OpenAPI code generation. + +Note that in the example on the docs, the flag `-h ./hack/boilerplate.go.txt` is used to allow add the LICENCE comment on the top of the documents and then, it can be removed. + + [kube-apiserver_options]: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/#options [controller-runtime_faq]: https://github.com/kubernetes-sigs/controller-runtime/blob/master/FAQ.md#q-how-do-i-have-different-logic-in-my-reconciler-for-different-types-of-events-eg-create-update-delete [finalizer]: /docs/golang/quickstart/#handle-cleanup-on-deletion @@ -150,3 +156,4 @@ This will work for the current environment. To persist this fix, add the above l [client.Reader]:https://godoc.org/sigs.k8s.io/controller-runtime/pkg/client#Reader [rbac]:https://kubernetes.io/docs/reference/access-authn-authz/rbac/ [goroot-github-issue]:https://github.com/operator-framework/operator-sdk/issues/1854#issuecomment-525132306 +[openapi-gen]: https://github.com/kubernetes/kube-openapi/tree/master/cmd/openapi-gen