From 175d4c4d212c7f2cf03f0c984632e5d4e4678a45 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 17 Jun 2024 15:29:02 +0800 Subject: [PATCH] try spread --- typespec-extension/src/code-model-builder.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typespec-extension/src/code-model-builder.ts b/typespec-extension/src/code-model-builder.ts index 98fc5d973f..c7145fbd30 100644 --- a/typespec-extension/src/code-model-builder.ts +++ b/typespec-extension/src/code-model-builder.ts @@ -1347,7 +1347,7 @@ export class CodeModelBuilder { schema = this.processSchemaFromSdkType(sdkType, body.name); } - const isAnonymousModel = sdkType.kind === "model" && sdkType.isGeneratedName === true; + const isAnonymousModel = sdkType.kind === "model" && body.kind === "Model" && !this.isArm(); const parameterName = body.kind === "Model" ? (sdkType.kind === "model" ? sdkType.name : "") : this.getName(body); const parameter = new Parameter(parameterName, this.getDoc(body), schema, { summary: this.getSummary(body),