From 6b7cd4d84b794e36f1b93eab8e6396979f403d6c Mon Sep 17 00:00:00 2001 From: Chenjie Shi Date: Wed, 6 Nov 2024 02:22:35 +0800 Subject: [PATCH] [tcgc] remove filtering core model flag (#1806) fix: https://github.com/Azure/typespec-azure/issues/1803 --------- Co-authored-by: iscai-msft --- .chronus/changes/remove_flag-2024-10-5-18-43-3.md | 7 +++++++ packages/typespec-client-generator-core/src/interfaces.ts | 1 - .../test/methods/lro.test.ts | 2 -- .../test/types/array-types.test.ts | 2 -- .../test/types/built-in-types.test.ts | 1 - .../test/types/model-types.test.ts | 2 -- 6 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 .chronus/changes/remove_flag-2024-10-5-18-43-3.md diff --git a/.chronus/changes/remove_flag-2024-10-5-18-43-3.md b/.chronus/changes/remove_flag-2024-10-5-18-43-3.md new file mode 100644 index 0000000000..9cf9d5dd29 --- /dev/null +++ b/.chronus/changes/remove_flag-2024-10-5-18-43-3.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@azure-tools/typespec-client-generator-core" +--- + +remove filtering core model flag \ No newline at end of file diff --git a/packages/typespec-client-generator-core/src/interfaces.ts b/packages/typespec-client-generator-core/src/interfaces.ts index 7fa8a789d8..727de16746 100644 --- a/packages/typespec-client-generator-core/src/interfaces.ts +++ b/packages/typespec-client-generator-core/src/interfaces.ts @@ -66,7 +66,6 @@ export interface SdkContext< export interface SdkEmitterOptions { "generate-protocol-methods"?: boolean; "generate-convenience-methods"?: boolean; - "filter-out-core-models"?: boolean; "package-name"?: string; "flatten-union-as-enum"?: boolean; "api-version"?: string; diff --git a/packages/typespec-client-generator-core/test/methods/lro.test.ts b/packages/typespec-client-generator-core/test/methods/lro.test.ts index 11ecd177f8..b39abad310 100644 --- a/packages/typespec-client-generator-core/test/methods/lro.test.ts +++ b/packages/typespec-client-generator-core/test/methods/lro.test.ts @@ -15,7 +15,6 @@ describe("typespec-client-generator-core: long running operation metadata", () = runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core", "Azure.Core.Traits"], - "filter-out-core-models": false, // need to check some Azure.Core models }); const baseCompile = runner.compile; runner.compileWithVersionedService = async function (code) { @@ -379,7 +378,6 @@ describe("typespec-client-generator-core: long running operation metadata", () = runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary, AzureResourceManagerTestLibrary, OpenAPITestLibrary], autoUsings: ["Azure.Core", "Azure.Core.Traits", "Azure.ResourceManager"], - "filter-out-core-models": false, // need to check some Azure.Core models }); const baseCompile = runner.compile; runner.compileWithVersionedService = async function (code) { diff --git a/packages/typespec-client-generator-core/test/types/array-types.test.ts b/packages/typespec-client-generator-core/test/types/array-types.test.ts index 1f5307433f..5ca2cc1cc3 100644 --- a/packages/typespec-client-generator-core/test/types/array-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/array-types.test.ts @@ -52,7 +52,6 @@ describe("typespec-client-generator-core: array types", () => { runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], - "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); await runner.compileWithBuiltInAzureCoreService(` @@ -79,7 +78,6 @@ describe("typespec-client-generator-core: array types", () => { runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], - "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); await runner.compileWithBuiltInAzureCoreService(` diff --git a/packages/typespec-client-generator-core/test/types/built-in-types.test.ts b/packages/typespec-client-generator-core/test/types/built-in-types.test.ts index 2e805c12fe..6019c9d4be 100644 --- a/packages/typespec-client-generator-core/test/types/built-in-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/built-in-types.test.ts @@ -268,7 +268,6 @@ describe("typespec-client-generator-core: built-in types", () => { runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], - "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); await runner.compileWithBuiltInAzureCoreService(` diff --git a/packages/typespec-client-generator-core/test/types/model-types.test.ts b/packages/typespec-client-generator-core/test/types/model-types.test.ts index bab5dd49cc..5fbee4e48d 100644 --- a/packages/typespec-client-generator-core/test/types/model-types.test.ts +++ b/packages/typespec-client-generator-core/test/types/model-types.test.ts @@ -720,7 +720,6 @@ describe("typespec-client-generator-core: model types", () => { runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], - "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); await runner.compileWithBuiltInAzureCoreService(` @@ -784,7 +783,6 @@ describe("typespec-client-generator-core: model types", () => { runner = await createSdkTestRunner({ librariesToAdd: [AzureCoreTestLibrary], autoUsings: ["Azure.Core"], - "filter-out-core-models": false, emitterName: "@azure-tools/typespec-java", }); await runner.compileWithBuiltInAzureCoreService(`