Skip to content

Commit 8b914fe

Browse files
authored
Hierarchy nested client support (#3163)
* check-no-emit-flag * hierarchy-nested-client-support * tsp compile * proposed-nested-client-implementation * add nested chain calls * modify poc according to review comment * add param alias and initialized by * add flattened clients * client hierarchy * fix classical client * support getChildClient method in parent client * fix todo client hierarchy * adopt to new tcgc version and support client hierarchy * fix ut * fix ci * fix integration test * fix top level api in multiple clients scenario * resolve comments * fix ci * resolve comments
1 parent 9e48052 commit 8b914fe

63 files changed

Lines changed: 1317 additions & 8217 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
},
1818
"[javascript]": {
1919
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
20+
},
21+
"[typespec]": {
22+
"editor.defaultFormatter": "typespec.typespec-vscode"
2023
}
2124
}

common/config/rush/pnpm-lock.yaml

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/typespec-test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@azure-tools/typespec-autorest": "0.56.0",
99
"@typespec/openapi3": "1.0.0",
1010
"@azure-tools/typespec-azure-core": "0.56.0",
11-
"@azure-tools/typespec-client-generator-core": "0.56.1",
11+
"@azure-tools/typespec-client-generator-core": "0.56.2",
1212
"@azure-tools/typespec-azure-resource-manager": "0.56.0",
1313
"@azure-tools/typespec-azure-rulesets": "0.56.0",
1414
"@typespec/compiler": "1.0.0",

packages/typespec-test/test/hierarchy_generic/generated/typespec-ts/src/fooClient.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ export class FooClient {
3030
this.b = _getBOperations(this._client);
3131
}
3232

33-
/** The operation groups for d */
34-
public readonly d: DOperations;
35-
/** The operation groups for b */
36-
public readonly b: BOperations;
37-
3833
op1(
3934
body: A,
4035
options: Op1OptionalParams = { requestOptions: {} },
4136
): Promise<void> {
4237
return op1(this._client, body, options);
4338
}
39+
40+
/** The operation groups for d */
41+
public readonly d: DOperations;
42+
/** The operation groups for b */
43+
public readonly b: BOperations;
4444
}

0 commit comments

Comments
 (0)