From 2de81f4eeb55f6916db8ec4ee05e7db82047bd4e Mon Sep 17 00:00:00 2001 From: kahirokunn Date: Tue, 14 Nov 2023 10:52:13 +0900 Subject: [PATCH] patch oazapfts --- .../kubernetes-typescript-client-codegen-openapi/package.json | 4 ++-- .../src/generate.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/kubernetes-typescript-client-codegen-openapi/package.json b/packages/kubernetes-typescript-client-codegen-openapi/package.json index aed49c59..b06abcb4 100644 --- a/packages/kubernetes-typescript-client-codegen-openapi/package.json +++ b/packages/kubernetes-typescript-client-codegen-openapi/package.json @@ -1,6 +1,6 @@ { "name": "kubernetes-typescript-client-codegen-openapi", - "version": "0.0.13", + "version": "0.0.14", "main": "lib/index.js", "types": "lib/index.d.ts", "author": "kahirokunn", @@ -57,7 +57,7 @@ }, "dependencies": { "@apidevtools/swagger-parser": "^10.0.2", - "@kahirokunn/oazapfts-patched": "^0.0.0-development", + "@kahirokunn/oazapfts-patched": "^0.0.1", "commander": "^6.2.0", "prettier": "^2.8.8", "semver": "^7.3.5", diff --git a/packages/kubernetes-typescript-client-codegen-openapi/src/generate.ts b/packages/kubernetes-typescript-client-codegen-openapi/src/generate.ts index 4515dda5..9e53d1c7 100644 --- a/packages/kubernetes-typescript-client-codegen-openapi/src/generate.ts +++ b/packages/kubernetes-typescript-client-codegen-openapi/src/generate.ts @@ -95,7 +95,7 @@ export async function generateApi( const interfaces: Record = {}; function registerInterface(declaration: ts.InterfaceDeclaration | ts.TypeAliasDeclaration) { const name = declaration.name.escapedText.toString(); - if (name in interfaces) { + if (name in interfaces && strict) { throw new Error(`interface/type alias ${name} already registered`); } interfaces[name] = declaration;