From d5cc37ed27eb856d36d0efb18484770cd0a939ba Mon Sep 17 00:00:00 2001 From: Mengqi Yu Date: Tue, 13 Jul 2021 15:04:09 -0700 Subject: [PATCH] change openapi url --- ts/create-kpt-functions/src/cmd/type_create.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/create-kpt-functions/src/cmd/type_create.ts b/ts/create-kpt-functions/src/cmd/type_create.ts index b147e9aba..92ac37df6 100644 --- a/ts/create-kpt-functions/src/cmd/type_create.ts +++ b/ts/create-kpt-functions/src/cmd/type_create.ts @@ -28,9 +28,9 @@ import { spawnSync } from 'child_process'; import { CLI_PACKAGE } from '../paths'; import { failure } from '../utils/format'; -// url for default swagger.json openAPI type definitions from kyaml library -// current kubernetes version v1.17.1 -const BUILTIN_OPENAPI_URL = `https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/kyaml/openapi/kubernetesapi/swagger.json`; +// url for default swagger.json openAPI type definitions from the kubernetes repo. +// current kubernetes version is v1.21.2 +const BUILTIN_OPENAPI_URL = `https://raw.githubusercontent.com/kubernetes/kubernetes/v1.21.2/api/openapi-spec/swagger.json`; export async function typeCreate(packageDir: string) { const desc = 'Generating types from OpenAPI spec.';