From 582b7bdcc60dcefeaec282a36727e6d6e64967b4 Mon Sep 17 00:00:00 2001 From: tadelesh Date: Wed, 21 Feb 2024 16:13:29 +0800 Subject: [PATCH] format --- packages/typespec-autorest/src/openapi.ts | 5 ++++- packages/typespec-autorest/test/flatten.test.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/typespec-autorest/src/openapi.ts b/packages/typespec-autorest/src/openapi.ts index 5cf0c86b6f..e2d10e4909 100644 --- a/packages/typespec-autorest/src/openapi.ts +++ b/packages/typespec-autorest/src/openapi.ts @@ -1946,7 +1946,10 @@ function createOAPIEmitter( } } - if (typespecType.kind === "ModelProperty" && shouldFlattenProperty(tcgcSdkContext, typespecType)) { + if ( + typespecType.kind === "ModelProperty" && + shouldFlattenProperty(tcgcSdkContext, typespecType) + ) { newTarget["x-ms-client-flatten"] = true; } diff --git a/packages/typespec-autorest/test/flatten.test.ts b/packages/typespec-autorest/test/flatten.test.ts index d3a698a679..6ef247d893 100644 --- a/packages/typespec-autorest/test/flatten.test.ts +++ b/packages/typespec-autorest/test/flatten.test.ts @@ -26,7 +26,7 @@ describe("typespec-autorest: flatten", () => { deepStrictEqual(model, { properties: { properties: { - "$ref": "#/definitions/WidgetProperties", + $ref: "#/definitions/WidgetProperties", "x-ms-client-flatten": true, }, }, @@ -56,7 +56,7 @@ describe("typespec-autorest: flatten", () => { deepStrictEqual(model, { properties: { properties: { - "$ref": "#/definitions/WidgetProperties", + $ref: "#/definitions/WidgetProperties", "x-ms-client-flatten": true, }, },