From 7e4230a96d71fe2da58ba2b0c9344919cee3e3e2 Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Tue, 16 Jun 2020 12:53:43 +0300 Subject: [PATCH 1/6] feat(faq.md): section about dropped openapi option Because `operator-sdk generate openapi` has been dropped, it is good to add here a section on how to work with openapi from now on --- website/content/en/docs/faq.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index ca4e5b33b5..a26bd8f4e1 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -142,6 +142,10 @@ $ 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. +# I cannot use the command `operator-sdk generate openapi` +A decision was made to extract this tool outside of operator-sdk in version v0.17, see migration guide on for that version [here][version_17x] and you should know that file file `./hack/boilerplate.go.txt` is for adding a LICENCE file to the top of documents, and 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 +154,5 @@ 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 +[version_17x]: /docs/migration/version-upgrade-guide/#v017x + From 1133126f25bd6d450acd5fe7a29fbfba03571fe9 Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:13:32 +0300 Subject: [PATCH 2/6] Update website/content/en/docs/faq.md Co-authored-by: Camila Macedo --- website/content/en/docs/faq.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index a26bd8f4e1..ed1911a215 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -154,5 +154,4 @@ A decision was made to extract this tool outside of operator-sdk in version v0.1 [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 -[version_17x]: /docs/migration/version-upgrade-guide/#v017x - +[openapi-gen]: https://github.com/kubernetes/kube-openapi/tree/master/cmd/openapi-gen From 550de7df16574f8d080f1815eace3bcd5ac60f44 Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:14:10 +0300 Subject: [PATCH 3/6] Update website/content/en/docs/faq.md Co-authored-by: Camila Macedo --- website/content/en/docs/faq.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index ed1911a215..6dda85fcaf 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -143,7 +143,9 @@ $ 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. # I cannot use the command `operator-sdk generate openapi` -A decision was made to extract this tool outside of operator-sdk in version v0.17, see migration guide on for that version [here][version_17x] and you should know that file file `./hack/boilerplate.go.txt` is for adding a LICENCE file to the top of documents, and can be removed +The command `operator-sdk generate openapi` was removed from the SDK tool in the version `v0.17.0`. It is now recommended to use [openapi-gen][openapi-gen] directly for OpenAPI code generation. + +Note that the file `./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 From 6e8f665cdc40a5a2c73f142bb1f2d318ef4ae247 Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:14:18 +0300 Subject: [PATCH 4/6] Update website/content/en/docs/faq.md Co-authored-by: Camila Macedo --- website/content/en/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index 6dda85fcaf..47aaf7cac9 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -142,7 +142,7 @@ $ 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. -# I cannot use the command `operator-sdk generate openapi` +## I cannot use the command `operator-sdk generate openapi` The command `operator-sdk generate openapi` was removed from the SDK tool in the version `v0.17.0`. It is now recommended to use [openapi-gen][openapi-gen] directly for OpenAPI code generation. Note that the file `./hack/boilerplate.go.txt` is used to allow add the LICENCE comment on the top of the documents and then, it can be removed. From 0ac325916892a0af25de4c7d07bdfe53614a6d5c Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:16:29 +0300 Subject: [PATCH 5/6] fix(faq): fix boilerplate flag --- website/content/en/docs/faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index 47aaf7cac9..a4e6ebc377 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -145,7 +145,7 @@ This will work for the current environment. To persist this fix, add the above l ## I cannot use the command `operator-sdk generate openapi` The command `operator-sdk generate openapi` was removed from the SDK tool in the version `v0.17.0`. It is now recommended to use [openapi-gen][openapi-gen] directly for OpenAPI code generation. -Note that the file `./hack/boilerplate.go.txt` is used to allow add the LICENCE comment on the top of the documents and then, it can be removed. +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 From 1c194f3a03a8651b93655027e7d26eba0e9bad15 Mon Sep 17 00:00:00 2001 From: Ron Green <11993626+georgettica@users.noreply.github.com> Date: Sun, 21 Jun 2020 11:08:38 +0300 Subject: [PATCH 6/6] Update website/content/en/docs/faq.md Co-authored-by: Joe Lanford --- website/content/en/docs/faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/content/en/docs/faq.md b/website/content/en/docs/faq.md index a4e6ebc377..580e62c38e 100644 --- a/website/content/en/docs/faq.md +++ b/website/content/en/docs/faq.md @@ -142,8 +142,8 @@ $ 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. -## I cannot use the command `operator-sdk generate openapi` -The command `operator-sdk generate openapi` was removed from the SDK tool in the version `v0.17.0`. It is now recommended to use [openapi-gen][openapi-gen] directly for OpenAPI code generation. +## 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.