Make update-codegen swagger work on gengo/v2
This commit is contained in:
		| @@ -322,14 +322,14 @@ kube::util::group-version-to-pkg-path() { | |||||||
|     # Change "foo.bar.k8s.io/v1" -> "foo/v1" notation. |     # Change "foo.bar.k8s.io/v1" -> "foo/v1" notation. | ||||||
|     local simple_gv="${group_version/.*k8s.io/}" |     local simple_gv="${group_version/.*k8s.io/}" | ||||||
|     if [[ "${api}" = "${simple_gv}" ]]; then |     if [[ "${api}" = "${simple_gv}" ]]; then | ||||||
|       echo "vendor/k8s.io/api/${simple_gv}" |       echo "staging/src/k8s.io/api/${simple_gv}" | ||||||
|       return |       return | ||||||
|     fi |     fi | ||||||
|   done |   done | ||||||
|  |  | ||||||
|   # "v1" is the API GroupVersion |   # "v1" is the API GroupVersion | ||||||
|   if [[ "${group_version}" == "v1" ]]; then |   if [[ "${group_version}" == "v1" ]]; then | ||||||
|     echo "vendor/k8s.io/api/core/v1" |     echo "staging/src/k8s.io/api/core/v1" | ||||||
|     return |     return | ||||||
|   fi |   fi | ||||||
|  |  | ||||||
| @@ -342,13 +342,13 @@ kube::util::group-version-to-pkg-path() { | |||||||
|       echo "pkg/apis/core" |       echo "pkg/apis/core" | ||||||
|       ;; |       ;; | ||||||
|     meta/v1) |     meta/v1) | ||||||
|       echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1" |       echo "staging/src/k8s.io/apimachinery/pkg/apis/meta/v1" | ||||||
|       ;; |       ;; | ||||||
|     meta/v1beta1) |     meta/v1beta1) | ||||||
|       echo "vendor/k8s.io/apimachinery/pkg/apis/meta/v1beta1" |       echo "staging/src/k8s.io/apimachinery/pkg/apis/meta/v1beta1" | ||||||
|       ;; |       ;; | ||||||
|     internal.apiserver.k8s.io/v1alpha1) |     internal.apiserver.k8s.io/v1alpha1) | ||||||
|       echo "vendor/k8s.io/api/apiserverinternal/v1alpha1" |       echo "staging/src/k8s.io/api/apiserverinternal/v1alpha1" | ||||||
|       ;; |       ;; | ||||||
|     *.k8s.io) |     *.k8s.io) | ||||||
|       echo "pkg/apis/${group_version%.*k8s.io}" |       echo "pkg/apis/${group_version%.*k8s.io}" | ||||||
|   | |||||||
| @@ -247,7 +247,7 @@ EOF | |||||||
| # first in the case of regenerating everything. | # first in the case of regenerating everything. | ||||||
| function codegen::swagger() { | function codegen::swagger() { | ||||||
|     # Build the tool |     # Build the tool | ||||||
|     GO111MODULE=on GOPROXY=off go install \ |     GOPROXY=off go install \ | ||||||
|         ./cmd/genswaggertypedocs |         ./cmd/genswaggertypedocs | ||||||
|  |  | ||||||
|     local group_versions=() |     local group_versions=() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tim Hockin
					Tim Hockin