@typespec/http-client-csharp 1.0.0-alpha.20250321.5 → 1.0.0-alpha.20250324.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/emitter/src/index.d.ts +1 -1
- package/dist/emitter/src/index.d.ts.map +1 -1
- package/dist/emitter/src/index.js +1 -1
- package/dist/emitter/src/index.js.map +1 -1
- package/dist/emitter/src/lib/lib.d.ts +3 -0
- package/dist/emitter/src/lib/lib.d.ts.map +1 -1
- package/dist/emitter/src/lib/lib.js +1 -1
- package/dist/emitter/src/lib/lib.js.map +1 -1
- package/dist/emitter/src/options.d.ts +5 -18
- package/dist/emitter/src/options.d.ts.map +1 -1
- package/dist/emitter/src/options.js +62 -27
- package/dist/emitter/src/options.js.map +1 -1
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.StubLibrary.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.ClientModel.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.Input.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.Input.pdb +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.dll +0 -0
- package/dist/generator/Microsoft.TypeSpec.Generator.pdb +0 -0
- package/package.json +8 -4
- package/readme.md +108 -48
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { configurationFileName, tspOutputFileName } from "./constants.js";
|
|
2
2
|
export { $onEmit, writeCodeModel } from "./emitter.js";
|
|
3
3
|
export { createModel } from "./lib/client-model-builder.js";
|
|
4
|
-
export { createDiagnostic, getTracer, reportDiagnostic } from "./lib/lib.js";
|
|
4
|
+
export { $lib, createDiagnostic, getTracer, reportDiagnostic } from "./lib/lib.js";
|
|
5
5
|
export { LoggerLevel } from "./lib/logger-level.js";
|
|
6
6
|
export { Logger } from "./lib/logger.js";
|
|
7
7
|
export { CSharpEmitterOptions, CSharpEmitterOptionsSchema, defaultOptions, resolveOptions, } from "./options.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../emitter/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../emitter/src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EACL,oBAAoB,EACpB,0BAA0B,EAC1B,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
export { configurationFileName, tspOutputFileName } from "./constants.js";
|
|
4
4
|
export { $onEmit, writeCodeModel } from "./emitter.js";
|
|
5
5
|
export { createModel } from "./lib/client-model-builder.js";
|
|
6
|
-
export { createDiagnostic, getTracer, reportDiagnostic } from "./lib/lib.js";
|
|
6
|
+
export { $lib, createDiagnostic, getTracer, reportDiagnostic } from "./lib/lib.js";
|
|
7
7
|
export { LoggerLevel } from "./lib/logger-level.js";
|
|
8
8
|
export { Logger } from "./lib/logger.js";
|
|
9
9
|
export { CSharpEmitterOptionsSchema, defaultOptions, resolveOptions, } from "./options.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../emitter/src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../emitter/src/index.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,+FAA+F;AAE/F,OAAO,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAEL,0BAA0B,EAC1B,cAAc,EACd,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -5,6 +5,9 @@ export type DiagnosticMessagesMap = {
|
|
|
5
5
|
declare const diags: {
|
|
6
6
|
[code: string]: DiagnosticDefinition<DiagnosticMessages>;
|
|
7
7
|
};
|
|
8
|
+
export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
}, import("../options.js").CSharpEmitterOptions, never>;
|
|
8
11
|
/**
|
|
9
12
|
* Reports a diagnostic. Defined in the core compiler.
|
|
10
13
|
* @beta
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../emitter/src/lib/lib.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,oBAAoB,EACpB,kBAAkB,EAEnB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,qBAAqB,GAAG;KACjC,CAAC,IAAI,MAAM,OAAO,KAAK,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;CACzD,CAAC;AAEF,QAAA,MAAM,KAAK,EAAE;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAAC,kBAAkB,CAAC,CAAA;CAyFtE,CAAC;
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../emitter/src/lib/lib.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,oBAAoB,EACpB,kBAAkB,EAEnB,MAAM,oBAAoB,CAAC;AAG5B,MAAM,MAAM,qBAAqB,GAAG;KACjC,CAAC,IAAI,MAAM,OAAO,KAAK,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;CACzD,CAAC;AAEF,QAAA,MAAM,KAAK,EAAE;IA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H,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;AAEtD;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateSdkContextOptions
|
|
1
|
+
import { CreateSdkContextOptions } from "@azure-tools/typespec-client-generator-core";
|
|
2
2
|
import { EmitContext, JSONSchemaType } from "@typespec/compiler";
|
|
3
3
|
import { LoggerLevel } from "./lib/logger-level.js";
|
|
4
4
|
import { CodeModel } from "./type/code-model.js";
|
|
@@ -6,10 +6,8 @@ import { CodeModel } from "./type/code-model.js";
|
|
|
6
6
|
* The emitter options for the CSharp emitter.
|
|
7
7
|
* @beta
|
|
8
8
|
*/
|
|
9
|
-
export interface CSharpEmitterOptions
|
|
9
|
+
export interface CSharpEmitterOptions {
|
|
10
10
|
"api-version"?: string;
|
|
11
|
-
outputFile?: string;
|
|
12
|
-
logFile?: string;
|
|
13
11
|
"unreferenced-types-handling"?: "removeOrInternalize" | "internalize" | "keepAll";
|
|
14
12
|
"new-project"?: boolean;
|
|
15
13
|
"clear-output-folder"?: boolean;
|
|
@@ -21,6 +19,8 @@ export interface CSharpEmitterOptions extends SdkEmitterOptions {
|
|
|
21
19
|
"emitter-extension-path"?: string;
|
|
22
20
|
"update-code-model"?: (model: CodeModel) => CodeModel;
|
|
23
21
|
"sdk-context-options"?: CreateSdkContextOptions;
|
|
22
|
+
"generate-protocol-methods"?: boolean;
|
|
23
|
+
"generate-convenience-methods"?: boolean;
|
|
24
24
|
"package-name"?: string;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
@@ -34,8 +34,6 @@ export declare const CSharpEmitterOptionsSchema: JSONSchemaType<CSharpEmitterOpt
|
|
|
34
34
|
*/
|
|
35
35
|
export declare const defaultOptions: {
|
|
36
36
|
"api-version": string;
|
|
37
|
-
outputFile: string;
|
|
38
|
-
logFile: string;
|
|
39
37
|
"new-project": boolean;
|
|
40
38
|
"clear-output-folder": boolean;
|
|
41
39
|
"save-inputs": boolean;
|
|
@@ -56,8 +54,6 @@ export declare const defaultOptions: {
|
|
|
56
54
|
* @beta
|
|
57
55
|
*/
|
|
58
56
|
export declare function resolveOptions(context: EmitContext<CSharpEmitterOptions>): {
|
|
59
|
-
outputFile: string;
|
|
60
|
-
logFile: string;
|
|
61
57
|
"api-version": string;
|
|
62
58
|
"unreferenced-types-handling"?: "removeOrInternalize" | "internalize" | "keepAll";
|
|
63
59
|
"new-project": boolean;
|
|
@@ -70,17 +66,8 @@ export declare function resolveOptions(context: EmitContext<CSharpEmitterOptions
|
|
|
70
66
|
"emitter-extension-path": string;
|
|
71
67
|
"update-code-model": (model: CodeModel) => CodeModel;
|
|
72
68
|
"sdk-context-options": CreateSdkContextOptions;
|
|
73
|
-
"package-name": string;
|
|
74
69
|
"generate-protocol-methods": boolean;
|
|
75
70
|
"generate-convenience-methods": boolean;
|
|
76
|
-
"
|
|
77
|
-
namespace?: string;
|
|
78
|
-
license?: {
|
|
79
|
-
name: string;
|
|
80
|
-
company?: string;
|
|
81
|
-
link?: string;
|
|
82
|
-
header?: string;
|
|
83
|
-
description?: string;
|
|
84
|
-
};
|
|
71
|
+
"package-name": string;
|
|
85
72
|
};
|
|
86
73
|
//# sourceMappingURL=options.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../emitter/src/options.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../emitter/src/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,cAAc,EAAe,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,C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compiler";
|
|
2
|
-
import { _defaultGeneratorName
|
|
2
|
+
import { _defaultGeneratorName } from "./constants.js";
|
|
3
3
|
import { LoggerLevel } from "./lib/logger-level.js";
|
|
4
4
|
/**
|
|
5
5
|
* The JSON schema for the CSharp emitter options.
|
|
@@ -9,35 +9,71 @@ export const CSharpEmitterOptionsSchema = {
|
|
|
9
9
|
type: "object",
|
|
10
10
|
additionalProperties: false,
|
|
11
11
|
properties: {
|
|
12
|
-
"
|
|
13
|
-
"examples-directory": { type: "string", nullable: true },
|
|
14
|
-
"examples-dir": { type: "string", nullable: true },
|
|
15
|
-
"api-version": { type: "string", nullable: true },
|
|
16
|
-
outputFile: { type: "string", nullable: true },
|
|
17
|
-
logFile: { type: "string", nullable: true },
|
|
18
|
-
"unreferenced-types-handling": {
|
|
12
|
+
"api-version": {
|
|
19
13
|
type: "string",
|
|
20
|
-
enum: ["removeOrInternalize", "internalize", "keepAll"],
|
|
21
14
|
nullable: true,
|
|
15
|
+
description: "For TypeSpec files using the [`@versioned`](https://typespec.io/docs/libraries/versioning/reference/decorators/#@TypeSpec.Versioning.versioned) decorator, " +
|
|
16
|
+
"set this option to the version that should be used to generate against.",
|
|
22
17
|
},
|
|
23
|
-
"new-project": { type: "boolean", nullable: true },
|
|
24
|
-
"clear-output-folder": { type: "boolean", nullable: true },
|
|
25
|
-
"save-inputs": { type: "boolean", nullable: true },
|
|
26
18
|
"generate-protocol-methods": { type: "boolean", nullable: true },
|
|
27
19
|
"generate-convenience-methods": { type: "boolean", nullable: true },
|
|
28
|
-
"
|
|
29
|
-
|
|
30
|
-
|
|
20
|
+
"unreferenced-types-handling": {
|
|
21
|
+
type: "string",
|
|
22
|
+
enum: ["removeOrInternalize", "internalize", "keepAll"],
|
|
23
|
+
nullable: true,
|
|
24
|
+
description: "Defines the strategy on how to handle unreferenced types. The default value is `removeOrInternalize`.",
|
|
25
|
+
},
|
|
26
|
+
"new-project": {
|
|
27
|
+
type: "boolean",
|
|
28
|
+
nullable: true,
|
|
29
|
+
description: "Set to `true` to overwrite the csproj if it already exists. The default value is `false`.",
|
|
30
|
+
},
|
|
31
|
+
"clear-output-folder": {
|
|
32
|
+
type: "boolean",
|
|
33
|
+
nullable: true,
|
|
34
|
+
description: "Indicates if you want to clear the output folder before generating. The default value is `true`.",
|
|
35
|
+
},
|
|
36
|
+
"save-inputs": {
|
|
37
|
+
type: "boolean",
|
|
38
|
+
nullable: true,
|
|
39
|
+
description: "Set to `true` to save the `tspCodeModel.json` and `Configuration.json` files that are emitted and used as inputs to the generator. The default value is `false`.",
|
|
40
|
+
},
|
|
41
|
+
"package-name": {
|
|
42
|
+
type: "string",
|
|
43
|
+
nullable: true,
|
|
44
|
+
description: "Define the package name. If not specified, the first namespace defined in the TypeSpec is used as the package name.",
|
|
45
|
+
},
|
|
46
|
+
debug: {
|
|
47
|
+
type: "boolean",
|
|
48
|
+
nullable: true,
|
|
49
|
+
description: "Set to `true` to automatically attempt to attach to a debugger when executing the C# generator. The default value is `false`.",
|
|
50
|
+
},
|
|
31
51
|
logLevel: {
|
|
32
52
|
type: "string",
|
|
33
53
|
enum: [LoggerLevel.INFO, LoggerLevel.DEBUG, LoggerLevel.VERBOSE],
|
|
34
54
|
nullable: true,
|
|
55
|
+
description: "Set the log level. The default value is `info`.",
|
|
56
|
+
},
|
|
57
|
+
"disable-xml-docs": {
|
|
58
|
+
type: "boolean",
|
|
59
|
+
nullable: true,
|
|
60
|
+
description: "Set to `true` to disable XML documentation generation. The default value is `false`.",
|
|
61
|
+
},
|
|
62
|
+
"generator-name": {
|
|
63
|
+
type: "string",
|
|
64
|
+
nullable: true,
|
|
65
|
+
description: "The name of the generator. By default this is set to `ScmCodeModelGenerator`. Generator authors can set this to the name of a generator that inherits from `ScmCodeModelGenerator`.",
|
|
66
|
+
},
|
|
67
|
+
"emitter-extension-path": {
|
|
68
|
+
type: "string",
|
|
69
|
+
nullable: true,
|
|
70
|
+
description: "Allows emitter authors to specify the path to a custom emitter package, allowing you to extend the emitter behavior. This should be set to `import.meta.url` if you are using a custom emitter.",
|
|
71
|
+
},
|
|
72
|
+
"update-code-model": {
|
|
73
|
+
type: "object",
|
|
74
|
+
nullable: true,
|
|
75
|
+
description: "Allows emitter authors to specify a custom function to modify the generated code model before emitting. This is useful for modifying the code model before it is passed to the generator.",
|
|
35
76
|
},
|
|
36
|
-
"disable-xml-docs": { type: "boolean", nullable: true },
|
|
37
|
-
"generator-name": { type: "string", nullable: true },
|
|
38
|
-
"emitter-extension-path": { type: "string", nullable: true },
|
|
39
|
-
"update-code-model": { type: "object", nullable: true },
|
|
40
|
-
namespace: { type: "string", nullable: true },
|
|
41
77
|
license: {
|
|
42
78
|
type: "object",
|
|
43
79
|
additionalProperties: false,
|
|
@@ -50,8 +86,13 @@ export const CSharpEmitterOptionsSchema = {
|
|
|
50
86
|
header: { type: "string", nullable: true },
|
|
51
87
|
description: { type: "string", nullable: true },
|
|
52
88
|
},
|
|
89
|
+
description: "License information for the generated client code.",
|
|
90
|
+
},
|
|
91
|
+
"sdk-context-options": {
|
|
92
|
+
type: "object",
|
|
93
|
+
nullable: true,
|
|
94
|
+
description: "The SDK context options that implement the `CreateSdkContextOptions` interface from the [`@azure-tools/typespec-client-generator-core`](https://www.npmjs.com/package/@azure-tools/typespec-client-generator-core) package to be used by the CSharp emitter.",
|
|
53
95
|
},
|
|
54
|
-
"sdk-context-options": { type: "object", nullable: true },
|
|
55
96
|
},
|
|
56
97
|
required: [],
|
|
57
98
|
};
|
|
@@ -61,8 +102,6 @@ export const CSharpEmitterOptionsSchema = {
|
|
|
61
102
|
*/
|
|
62
103
|
export const defaultOptions = {
|
|
63
104
|
"api-version": "latest",
|
|
64
|
-
outputFile: tspOutputFileName,
|
|
65
|
-
logFile: "log.json",
|
|
66
105
|
"new-project": false,
|
|
67
106
|
"clear-output-folder": false,
|
|
68
107
|
"save-inputs": false,
|
|
@@ -84,13 +123,9 @@ export const defaultOptions = {
|
|
|
84
123
|
*/
|
|
85
124
|
export function resolveOptions(context) {
|
|
86
125
|
const emitterOptions = context.options;
|
|
87
|
-
const emitterOutputDir = context.emitterOutputDir;
|
|
88
126
|
const resolvedOptions = { ...defaultOptions, ...emitterOptions };
|
|
89
|
-
const outputFolder = _resolveOutputFolder(context);
|
|
90
127
|
return {
|
|
91
128
|
...resolvedOptions,
|
|
92
|
-
outputFile: resolvePath(outputFolder, resolvedOptions.outputFile),
|
|
93
|
-
logFile: resolvePath(emitterOutputDir ?? "./tsp-output", resolvedOptions.logFile),
|
|
94
129
|
};
|
|
95
130
|
}
|
|
96
131
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../emitter/src/options.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../../emitter/src/options.ts"],"names":[],"mappings":"AACA,OAAO,EAA+B,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAyBpD;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAyC;IAC9E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,aAAa,EAAE;YACb,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,6JAA6J;gBAC7J,yEAAyE;SAC5E;QACD,2BAA2B,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QAChE,8BAA8B,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,IAAI,EAAE;QACnE,6BAA6B,EAAE;YAC7B,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,CAAC,qBAAqB,EAAE,aAAa,EAAE,SAAS,CAAC;YACvD,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,uGAAuG;SAC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AAM,UAAU,oBAAoB,CAAC,OAA0C;IAC7E,OAAO,WAAW,CAAC,OAAO,CAAC,gBAAgB,IAAI,cAAc,CAAC,CAAC;AACjE,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typespec/http-client-csharp",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.20250324.2",
|
|
4
4
|
"author": "Microsoft Corporation",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "TypeSpec library for emitting Http Client libraries for C#.",
|
|
6
6
|
"homepage": "https://typespec.io",
|
|
7
7
|
"readme": "https://github.com/Microsoft/typespec/blob/main/packages/http-client-csharp/readme.md",
|
|
8
8
|
"license": "MIT",
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"main": "dist/emitter/src/index.js",
|
|
21
21
|
"exports": {
|
|
22
|
-
".":
|
|
22
|
+
".": {
|
|
23
|
+
"types": "./dist/emitter/src/index.d.ts",
|
|
24
|
+
"default": "./dist/emitter/src/index.js"
|
|
25
|
+
}
|
|
23
26
|
},
|
|
24
27
|
"scripts": {
|
|
25
28
|
"clean": "rimraf ./dist ./emitter/temp && dotnet clean ./generator",
|
|
@@ -37,7 +40,8 @@
|
|
|
37
40
|
"lint": "eslint . --max-warnings=0",
|
|
38
41
|
"lint:fix": "eslint . --fix",
|
|
39
42
|
"format": "pnpm -w format:dir packages/http-client-csharp",
|
|
40
|
-
"extract-api": "npx api-extractor run --local --verbose"
|
|
43
|
+
"extract-api": "npx api-extractor run --local --verbose",
|
|
44
|
+
"regen-docs": "node ../../packages/tspd/cmd/tspd.js doc . --enable-experimental --output-dir ../../website/src/content/docs/docs/emitters/clients/http-client-csharp/reference --skip-js"
|
|
41
45
|
},
|
|
42
46
|
"files": [
|
|
43
47
|
"dist/emitter/src/**",
|
package/readme.md
CHANGED
|
@@ -1,75 +1,135 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @typespec/http-client-csharp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
TypeSpec library for emitting Http Client libraries for C#.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Install
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
```bash
|
|
8
|
+
npm install @typespec/http-client-csharp
|
|
9
|
+
```
|
|
9
10
|
|
|
10
|
-
##
|
|
11
|
+
## Usage
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
# Prerequisite
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
- Install [Node.js](https://nodejs.org/download/) 20 or above. (Verify by running `node --version`)
|
|
16
|
+
- Install [**.NET 8.0 SDK**](https://dotnet.microsoft.com/download/dotnet/8.0) for your specific platform. (or a higher version)
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
## Usage
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
1. Via the command line
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
```bash
|
|
23
|
+
tsp compile . --emit=@typespec/http-client-csharp
|
|
24
|
+
```
|
|
21
25
|
|
|
22
|
-
|
|
26
|
+
2. Via the config
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
```yaml
|
|
29
|
+
emit:
|
|
30
|
+
- "@typespec/http-client-csharp"
|
|
31
|
+
```
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
The config can be extended with options as follows:
|
|
27
34
|
|
|
28
|
-
```
|
|
29
|
-
|
|
35
|
+
```yaml
|
|
36
|
+
emit:
|
|
37
|
+
- "@typespec/http-client-csharp"
|
|
38
|
+
options:
|
|
39
|
+
"@typespec/http-client-csharp":
|
|
40
|
+
option: value
|
|
30
41
|
```
|
|
31
42
|
|
|
32
|
-
##
|
|
43
|
+
## Emitter options
|
|
33
44
|
|
|
34
|
-
|
|
45
|
+
### `api-version`
|
|
35
46
|
|
|
36
|
-
|
|
47
|
+
**Type:** `string`
|
|
37
48
|
|
|
38
|
-
|
|
49
|
+
For TypeSpec files using the [`@versioned`](https://typespec.io/docs/libraries/versioning/reference/decorators/#@TypeSpec.Versioning.versioned) decorator, set this option to the version that should be used to generate against.
|
|
39
50
|
|
|
40
|
-
|
|
51
|
+
### `generate-protocol-methods`
|
|
41
52
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
53
|
+
**Type:** `boolean`
|
|
54
|
+
|
|
55
|
+
### `generate-convenience-methods`
|
|
56
|
+
|
|
57
|
+
**Type:** `boolean`
|
|
58
|
+
|
|
59
|
+
### `unreferenced-types-handling`
|
|
60
|
+
|
|
61
|
+
**Type:** `"removeOrInternalize" | "internalize" | "keepAll"`
|
|
62
|
+
|
|
63
|
+
Defines the strategy on how to handle unreferenced types. The default value is `removeOrInternalize`.
|
|
64
|
+
|
|
65
|
+
### `new-project`
|
|
66
|
+
|
|
67
|
+
**Type:** `boolean`
|
|
68
|
+
|
|
69
|
+
Set to `true` to overwrite the csproj if it already exists. The default value is `false`.
|
|
70
|
+
|
|
71
|
+
### `clear-output-folder`
|
|
72
|
+
|
|
73
|
+
**Type:** `boolean`
|
|
74
|
+
|
|
75
|
+
Indicates if you want to clear the output folder before generating. The default value is `true`.
|
|
76
|
+
|
|
77
|
+
### `save-inputs`
|
|
78
|
+
|
|
79
|
+
**Type:** `boolean`
|
|
80
|
+
|
|
81
|
+
Set to `true` to save the `tspCodeModel.json` and `Configuration.json` files that are emitted and used as inputs to the generator. The default value is `false`.
|
|
82
|
+
|
|
83
|
+
### `package-name`
|
|
84
|
+
|
|
85
|
+
**Type:** `string`
|
|
86
|
+
|
|
87
|
+
Define the package name. If not specified, the first namespace defined in the TypeSpec is used as the package name.
|
|
88
|
+
|
|
89
|
+
### `debug`
|
|
90
|
+
|
|
91
|
+
**Type:** `boolean`
|
|
92
|
+
|
|
93
|
+
Set to `true` to automatically attempt to attach to a debugger when executing the C# generator. The default value is `false`.
|
|
94
|
+
|
|
95
|
+
### `logLevel`
|
|
96
|
+
|
|
97
|
+
**Type:** `"info" | "debug" | "verbose"`
|
|
98
|
+
|
|
99
|
+
Set the log level. The default value is `info`.
|
|
100
|
+
|
|
101
|
+
### `disable-xml-docs`
|
|
102
|
+
|
|
103
|
+
**Type:** `boolean`
|
|
104
|
+
|
|
105
|
+
Set to `true` to disable XML documentation generation. The default value is `false`.
|
|
106
|
+
|
|
107
|
+
### `generator-name`
|
|
108
|
+
|
|
109
|
+
**Type:** `string`
|
|
110
|
+
|
|
111
|
+
The name of the generator. By default this is set to `ScmCodeModelGenerator`. Generator authors can set this to the name of a generator that inherits from `ScmCodeModelGenerator`.
|
|
112
|
+
|
|
113
|
+
### `emitter-extension-path`
|
|
114
|
+
|
|
115
|
+
**Type:** `string`
|
|
116
|
+
|
|
117
|
+
Allows emitter authors to specify the path to a custom emitter package, allowing you to extend the emitter behavior. This should be set to `import.meta.url` if you are using a custom emitter.
|
|
118
|
+
|
|
119
|
+
### `update-code-model`
|
|
120
|
+
|
|
121
|
+
**Type:** `object`
|
|
49
122
|
|
|
50
|
-
|
|
123
|
+
Allows emitter authors to specify a custom function to modify the generated code model before emitting. This is useful for modifying the code model before it is passed to the generator.
|
|
51
124
|
|
|
52
|
-
|
|
53
|
-
- `emitter-output-dir` define the output directory path which will store the generated code. If not specified, the `tsp-output` directory is used.
|
|
54
|
-
- `generate-protocol-methods` indicate if you want to generate a **protocol method** for every operation or not. The default value is `true`.
|
|
55
|
-
- `generate-convenience-methods` indicate if you want to generate a **convenience method** for every operation or not. The default value is `true`.
|
|
56
|
-
- `disable-xml-docs` set to `true` to not generate XML docs in the generated library. The default value is `false`.
|
|
57
|
-
- `api-version` for TypeSpec files using the [`@versioned`](https://typespec.io/docs/libraries/versioning/reference/decorators/#@TypeSpec.Versioning.versioned) decorator, set to the version that should be used to generate against.
|
|
58
|
-
- `unreferenced-types-handling` define the strategy how to handle unreferenced types. It can be `removeOrInternalize`, `internalize` or `keepAll`. The default value is `removeOrInternalize`.
|
|
59
|
-
- `clear-output-folder` indicate if you want to clear up the output folder before generating. The default value is `true`.
|
|
60
|
-
- `new-project` set to `true` to overwrite the csproj if it already exists. The default value is `false`.
|
|
61
|
-
- `save-inputs` set to `true` to save the `tspCodeModel.json` and `Configuration.json` files that are emitted and used as inputs to the C# generator. The default value is `false`.
|
|
62
|
-
- `debug` set to `true` to automatically attempt to attach to a debugger when executing the C# generator. The default value is `false`.
|
|
63
|
-
- `generator-name` by default this is set to `ScmCodeModelGenerator`. Generator authors can set this to the name of a generator that inherits from `ScmCodeModelGenerator`.
|
|
125
|
+
### `license`
|
|
64
126
|
|
|
65
|
-
|
|
127
|
+
**Type:** `object`
|
|
66
128
|
|
|
67
|
-
|
|
68
|
-
A few exceptions are API of JSON Merge Patch, and API of long-running operation with ambiguous response type.
|
|
129
|
+
License information for the generated client code.
|
|
69
130
|
|
|
70
|
-
|
|
131
|
+
### `sdk-context-options`
|
|
71
132
|
|
|
72
|
-
|
|
133
|
+
**Type:** `object`
|
|
73
134
|
|
|
74
|
-
|
|
75
|
-
For details on how to run and debug these tests see [Spector Testing](generator/docs/spector.md).
|
|
135
|
+
The SDK context options that implement the `CreateSdkContextOptions` interface from the [`@azure-tools/typespec-client-generator-core`](https://www.npmjs.com/package/@azure-tools/typespec-client-generator-core) package to be used by the CSharp emitter.
|