Skip to content

Commit 11f2064

Browse files
authored
[tcgc] output auth related info in the yaml of code model (#2378)
more convenient for emitter to know the exact info of auth.
1 parent 7a12232 commit 11f2064

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
changeKind: feature
3+
packages:
4+
- "@azure-tools/typespec-client-generator-core"
5+
---
6+
7+
Output auth related info in the yaml of code model.

packages/typespec-client-generator-core/src/context.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,8 @@ async function exportTCGCOutput(context: SdkContext) {
154154
return undefined; // skip keys starting with "__" from the output
155155
}
156156
if (k === "scheme") {
157-
return undefined; // remove credential schema
157+
const { model, ...rest } = v;
158+
return rest; // remove credential schema's model property
158159
}
159160
if (k === "rawExample") {
160161
return undefined; // remove raw example

0 commit comments

Comments
 (0)