From 7fb502f3f03eaa5c0a80bbcf7dd29022205ca303 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Mon, 11 Nov 2024 15:30:49 +0800 Subject: [PATCH] update to use MockApiDefinition --- .../http/client/initialization/basic/mockapi.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/cadl-ranch-specs/http/client/initialization/basic/mockapi.ts b/packages/cadl-ranch-specs/http/client/initialization/basic/mockapi.ts index 513b524c7..dc28479d3 100644 --- a/packages/cadl-ranch-specs/http/client/initialization/basic/mockapi.ts +++ b/packages/cadl-ranch-specs/http/client/initialization/basic/mockapi.ts @@ -3,10 +3,12 @@ import { ScenarioMockApi } from "@azure-tools/cadl-ranch-api"; export const Scenarios: Record = {}; -Scenarios.Client_Initialization_Basic = passOnSuccess( - mockapi.post("/client/initialization/basic/sub-client/subclient1:action", (req) => { - return { - status: 204, - }; - }), -); +Scenarios.Client_Initialization_Basic = passOnSuccess({ + uri: "/client/initialization/basic/sub-client/subclient1:action", + method: "post", + request: {}, + response: { + status: 204, + }, + kind: "MockApiDefinition", +});