Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
tadelesh committed Feb 21, 2024
1 parent c37aabc commit 582b7bd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion packages/typespec-autorest/src/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
4 changes: 2 additions & 2 deletions packages/typespec-autorest/test/flatten.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ describe("typespec-autorest: flatten", () => {
deepStrictEqual(model, {
properties: {
properties: {
"$ref": "#/definitions/WidgetProperties",
$ref: "#/definitions/WidgetProperties",
"x-ms-client-flatten": true,
},
},
Expand Down Expand Up @@ -56,7 +56,7 @@ describe("typespec-autorest: flatten", () => {
deepStrictEqual(model, {
properties: {
properties: {
"$ref": "#/definitions/WidgetProperties",
$ref: "#/definitions/WidgetProperties",
"x-ms-client-flatten": true,
},
},
Expand Down

0 comments on commit 582b7bd

Please sign in to comment.