@typespec/http-server-csharp 0.58.0-alpha.11 → 0.58.0-alpha.12-dev.1
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/README.md +56 -6
- package/dist/src/cli/cli.js +76 -37
- package/dist/src/cli/cli.js.map +1 -1
- package/dist/src/lib/doc.d.ts +5 -0
- package/dist/src/lib/doc.d.ts.map +1 -0
- package/dist/src/lib/doc.js +237 -0
- package/dist/src/lib/doc.js.map +1 -0
- package/dist/src/lib/interfaces.d.ts +4 -1
- package/dist/src/lib/interfaces.d.ts.map +1 -1
- package/dist/src/lib/interfaces.js +7 -3
- package/dist/src/lib/interfaces.js.map +1 -1
- package/dist/src/lib/lib.d.ts +10 -2
- package/dist/src/lib/lib.d.ts.map +1 -1
- package/dist/src/lib/lib.js +24 -2
- package/dist/src/lib/lib.js.map +1 -1
- package/dist/src/lib/project.d.ts +5 -0
- package/dist/src/lib/project.d.ts.map +1 -0
- package/dist/src/lib/project.js +101 -0
- package/dist/src/lib/project.js.map +1 -0
- package/dist/src/lib/scaffolding.d.ts +2 -1
- package/dist/src/lib/scaffolding.d.ts.map +1 -1
- package/dist/src/lib/scaffolding.js +10 -6
- package/dist/src/lib/scaffolding.js.map +1 -1
- package/dist/src/lib/service.d.ts.map +1 -1
- package/dist/src/lib/service.js +64 -22
- package/dist/src/lib/service.js.map +1 -1
- package/dist/src/lib/utils.d.ts +10 -0
- package/dist/src/lib/utils.d.ts.map +1 -1
- package/dist/src/lib/utils.js +51 -1
- package/dist/src/lib/utils.js.map +1 -1
- package/package.json +15 -14
package/README.md
CHANGED
|
@@ -8,9 +8,7 @@ TypeSpec service code generator for c-sharp
|
|
|
8
8
|
npm install @typespec/http-server-csharp
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
### Usage
|
|
11
|
+
## Usage
|
|
14
12
|
|
|
15
13
|
1. Via the command line
|
|
16
14
|
|
|
@@ -25,16 +23,68 @@ emit:
|
|
|
25
23
|
- "@typespec/http-server-csharp"
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
|
|
26
|
+
The config can be extended with options as follows:
|
|
27
|
+
|
|
28
|
+
```yaml
|
|
29
|
+
emit:
|
|
30
|
+
- "@typespec/http-server-csharp"
|
|
31
|
+
options:
|
|
32
|
+
"@typespec/http-server-csharp":
|
|
33
|
+
option: value
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Emitter options
|
|
29
37
|
|
|
30
|
-
|
|
38
|
+
### `skip-format`
|
|
31
39
|
|
|
32
40
|
**Type:** `boolean`
|
|
33
41
|
|
|
34
42
|
Skips formatting of generated C# Types. By default, C# files are formatted using 'dotnet format'.
|
|
35
43
|
|
|
36
|
-
|
|
44
|
+
### `output-type`
|
|
37
45
|
|
|
38
46
|
**Type:** `"models" | "all"`
|
|
39
47
|
|
|
40
48
|
Chooses which service artifacts to emit. choices include 'models' or 'all' artifacts.
|
|
49
|
+
|
|
50
|
+
### `emit-mocks`
|
|
51
|
+
|
|
52
|
+
**Type:** `"mocks-and-project-files" | "mocks-only" | "none"`
|
|
53
|
+
|
|
54
|
+
Emits mock implementations of business logic, setup code, and project files, enabling the service to respond to requests before a real implementation is provided
|
|
55
|
+
|
|
56
|
+
### `use-swaggerui`
|
|
57
|
+
|
|
58
|
+
**Type:** `boolean`
|
|
59
|
+
|
|
60
|
+
Configure a Swagger UI endpoint in the development configuration
|
|
61
|
+
|
|
62
|
+
### `openapi-path`
|
|
63
|
+
|
|
64
|
+
**Type:** `string`
|
|
65
|
+
|
|
66
|
+
Use openapi at the given path for generating SwaggerUI endpoints. By default, this will be 'openapi/openapi.yaml' if the 'use-swaggerui' option is enabled.
|
|
67
|
+
|
|
68
|
+
### `overwrite`
|
|
69
|
+
|
|
70
|
+
**Type:** `boolean`
|
|
71
|
+
|
|
72
|
+
When generating mock and project files, overwrite any existing files with the same name.
|
|
73
|
+
|
|
74
|
+
### `project-name`
|
|
75
|
+
|
|
76
|
+
**Type:** `string`
|
|
77
|
+
|
|
78
|
+
The name of the generated project.
|
|
79
|
+
|
|
80
|
+
### `http-port`
|
|
81
|
+
|
|
82
|
+
**Type:** `number`
|
|
83
|
+
|
|
84
|
+
The service http port when hosting the project locally.
|
|
85
|
+
|
|
86
|
+
### `https-port`
|
|
87
|
+
|
|
88
|
+
**Type:** `number`
|
|
89
|
+
|
|
90
|
+
The service https port when hosting the project locally.
|
package/dist/src/cli/cli.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import { resolvePath } from "@typespec/compiler";
|
|
3
3
|
import { spawn } from "cross-spawn";
|
|
4
|
+
import path from "path";
|
|
4
5
|
import pc from "picocolors";
|
|
5
6
|
import yargs from "yargs";
|
|
6
7
|
import { hideBin } from "yargs/helpers";
|
|
8
|
+
import { getFreePort } from "../lib/utils.js";
|
|
7
9
|
async function main() {
|
|
8
10
|
console.log(`TypeSpec Http Server Emitter for C-Sharp \n`);
|
|
9
11
|
await yargs(hideBin(process.argv))
|
|
@@ -14,46 +16,50 @@ async function main() {
|
|
|
14
16
|
"greedy-arrays": false,
|
|
15
17
|
"boolean-negation": false,
|
|
16
18
|
})
|
|
17
|
-
.command("scaffold [--
|
|
19
|
+
.command("scaffold <path-to-spec> [--output <project-directory>] [--use-swaggerui] [OPTIONS]", "Generate a complete project with mock implementation at the given project-directory for the given spec. This requires dotnet 9: https://dotnet.microsoft.com/download.", (cmd) => {
|
|
18
20
|
return cmd
|
|
19
21
|
.option("use-swaggerui", {
|
|
20
22
|
description: "Include generated OpenAPI and a SwaggerUI endpoint in the service project. THIS OPTION REQUIRES '@typespec/openapi3' as a dependency of your typespec project.",
|
|
21
23
|
type: "boolean",
|
|
22
24
|
default: false,
|
|
23
25
|
})
|
|
24
|
-
.
|
|
26
|
+
.option("project-name", {
|
|
27
|
+
description: "The name of the generated project.",
|
|
28
|
+
type: "string",
|
|
29
|
+
default: "ServiceProject",
|
|
30
|
+
})
|
|
31
|
+
.option("http-port", {
|
|
32
|
+
description: "The http port for the generated project to use locally",
|
|
33
|
+
type: "number",
|
|
34
|
+
})
|
|
35
|
+
.option("https-port", {
|
|
36
|
+
description: "The https port for the generated service to listen on locally.",
|
|
37
|
+
type: "number",
|
|
38
|
+
})
|
|
39
|
+
.option("overwrite", {
|
|
40
|
+
description: "Overwrite existing mock implementations and project files",
|
|
41
|
+
type: "boolean",
|
|
42
|
+
default: true,
|
|
43
|
+
})
|
|
44
|
+
.option("output", {
|
|
25
45
|
description: "Path to the directory where the project will be created.",
|
|
26
46
|
type: "string",
|
|
27
|
-
demandOption: true,
|
|
28
47
|
})
|
|
29
48
|
.positional("path-to-spec", {
|
|
30
|
-
description: "The path to the spec
|
|
49
|
+
description: "The path to the TypeSpec spec or TypeSpec project directory",
|
|
31
50
|
type: "string",
|
|
32
51
|
demandOption: true,
|
|
33
52
|
});
|
|
34
53
|
}, async (args) => {
|
|
35
|
-
const projectDir = resolvePath(process.cwd(), args["
|
|
54
|
+
const projectDir = args["output"] !== undefined ? resolvePath(process.cwd(), args["output"]) : undefined;
|
|
36
55
|
const pathToSpec = resolvePath(process.cwd(), args["path-to-spec"]);
|
|
37
56
|
const useSwagger = args["use-swaggerui"];
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
if (useSwagger) {
|
|
45
|
-
console.log(pc.bold("Adding OpenApi generation support"));
|
|
46
|
-
console.log(pc.green(`> dotnet add ${projectDir} package SwashBuckle.AspNetCore`));
|
|
47
|
-
result = await runScriptAsync("dotnet", [
|
|
48
|
-
"add",
|
|
49
|
-
projectDir,
|
|
50
|
-
"package",
|
|
51
|
-
"SwashBuckle.AspNetCore",
|
|
52
|
-
]);
|
|
53
|
-
}
|
|
54
|
-
console.log(pc.bold("Compiling spec with mock implementations"));
|
|
55
|
-
const generatedTargetDir = resolvePath(process.cwd(), projectDir, "generated");
|
|
56
|
-
const generatedOpenApiDir = resolvePath(process.cwd(), projectDir, "openapi");
|
|
57
|
+
const overwrite = args["overwrite"];
|
|
58
|
+
const projectName = args["project-name"];
|
|
59
|
+
const httpPort = args["http-port"] || (await getFreePort(5000, 5999));
|
|
60
|
+
const httpsPort = args["https-port"] || (await getFreePort(7000, 7999));
|
|
61
|
+
console.log(pc.bold("Compiling spec to create ASP.Net core project with mock implementations"));
|
|
62
|
+
console.log(pc.bold(`using http port ${httpPort} and https port ${httpsPort}`));
|
|
57
63
|
const compileArgs = [
|
|
58
64
|
"tsp",
|
|
59
65
|
"compile",
|
|
@@ -61,24 +67,41 @@ async function main() {
|
|
|
61
67
|
"--emit",
|
|
62
68
|
"@typespec/http-server-csharp",
|
|
63
69
|
"--option",
|
|
64
|
-
|
|
70
|
+
"@typespec/http-server-csharp.emit-mocks=mocks-and-project-files",
|
|
65
71
|
"--option",
|
|
66
|
-
|
|
72
|
+
`@typespec/http-server-csharp.project-name=${projectName}`,
|
|
73
|
+
"--trace",
|
|
74
|
+
"http-server-csharp",
|
|
67
75
|
];
|
|
76
|
+
if (overwrite) {
|
|
77
|
+
compileArgs.push("--option", "@typespec/http-server-csharp.overwrite=true");
|
|
78
|
+
}
|
|
79
|
+
if (httpPort) {
|
|
80
|
+
compileArgs.push("--option", `@typespec/http-server-csharp.http-port=${httpPort}`);
|
|
81
|
+
}
|
|
82
|
+
if (httpsPort) {
|
|
83
|
+
compileArgs.push("--option", `@typespec/http-server-csharp.https-port=${httpsPort}`);
|
|
84
|
+
}
|
|
68
85
|
const swaggerArgs = [
|
|
69
86
|
"--emit",
|
|
70
87
|
"@typespec/openapi3",
|
|
71
88
|
"--option",
|
|
72
|
-
`@typespec/openapi3.emitter-output-dir=${generatedOpenApiDir}`,
|
|
73
|
-
"--option",
|
|
74
89
|
"@typespec/http-server-csharp.use-swaggerui=true",
|
|
75
90
|
];
|
|
91
|
+
if (projectDir) {
|
|
92
|
+
const generatedTargetDir = resolvePath(process.cwd(), projectDir, "generated");
|
|
93
|
+
const generatedOpenApiDir = resolvePath(process.cwd(), projectDir, "openapi");
|
|
94
|
+
const openApiPath = path
|
|
95
|
+
.relative(projectDir, resolvePath(generatedOpenApiDir, "openapi.yaml"))
|
|
96
|
+
.replaceAll("\\", "/");
|
|
97
|
+
compileArgs.push("--option", `@typespec/http-server-csharp.emitter-output-dir=${generatedTargetDir}`);
|
|
98
|
+
swaggerArgs.push("--option", `@typespec/openapi3.emitter-output-dir=${generatedOpenApiDir}`, "--option", `@typespec/http-server-csharp.openapi-path=${openApiPath}`);
|
|
99
|
+
}
|
|
76
100
|
if (useSwagger)
|
|
77
101
|
compileArgs.push(...swaggerArgs);
|
|
78
|
-
result = await runScriptAsync("npx", compileArgs);
|
|
102
|
+
const result = await runScriptAsync("npx", compileArgs);
|
|
79
103
|
if (result === 0) {
|
|
80
|
-
console.log(pc.bold(`Your project was successfully created
|
|
81
|
-
console.log(`You can build and start the project using 'dotnet run --project ${projectDir}'`);
|
|
104
|
+
console.log(pc.bold(`Your project was successfully created`));
|
|
82
105
|
}
|
|
83
106
|
else {
|
|
84
107
|
console.log(pc.bold("There were one or more errors"));
|
|
@@ -96,19 +119,35 @@ function internalError(error) {
|
|
|
96
119
|
// that risks losing it in the case of a bug that does not repro easily.
|
|
97
120
|
console.log(error);
|
|
98
121
|
}
|
|
122
|
+
function processStream(input) {
|
|
123
|
+
if (input === undefined || input === null)
|
|
124
|
+
return "";
|
|
125
|
+
const data = `${input}`;
|
|
126
|
+
const lines = data.split("\n");
|
|
127
|
+
const result = [];
|
|
128
|
+
for (const line of lines) {
|
|
129
|
+
if (line.includes("http-server-csharp") && line.includes("trace")) {
|
|
130
|
+
const endPos = line.indexOf("http-server-csharp") + 25;
|
|
131
|
+
result.push(pc.bold(line.substring(endPos)));
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
result.push(pc.dim(line));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return result.join("\n");
|
|
138
|
+
}
|
|
99
139
|
function runScriptAsync(cmd, args) {
|
|
100
140
|
let resolver;
|
|
101
|
-
|
|
102
|
-
const promise = new Promise((resolve, reject) => {
|
|
141
|
+
const promise = new Promise((resolve, _) => {
|
|
103
142
|
resolver = resolve;
|
|
104
|
-
rejecter = reject;
|
|
105
143
|
});
|
|
106
144
|
console.log(pc.green(`> ${cmd} ${args.join(" ")}`));
|
|
107
145
|
const proc = spawn(cmd, args);
|
|
108
|
-
proc.stdout?.on("data", (data) =>
|
|
146
|
+
proc.stdout?.on("data", (data) => {
|
|
147
|
+
console.log(processStream(data));
|
|
148
|
+
});
|
|
109
149
|
proc.stderr?.on("data", (data) => {
|
|
110
|
-
console.
|
|
111
|
-
rejecter(data);
|
|
150
|
+
console.log(processStream(data));
|
|
112
151
|
});
|
|
113
152
|
proc.on("close", (_, __) => {
|
|
114
153
|
resolver(proc.exitCode || 0);
|
package/dist/src/cli/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cli/cli.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/cli/cli.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,YAAY,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAA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AAS,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE;QACjD,QAAQ,GAAG,OAAO,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC;IACpD,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC9B,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QAC/B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE;QAC/B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;IACH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE;QACzB,QAAQ,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,KAAc,EAAE,EAAE;IAClD,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAC9C,aAAa,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,IAAI,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AssetEmitter } from "@typespec/asset-emitter";
|
|
2
|
+
import { LibrarySourceFile } from "./interfaces.js";
|
|
3
|
+
import { BusinessLogicRegistrations } from "./scaffolding.js";
|
|
4
|
+
export declare function getProjectDocs(emitter: AssetEmitter<string, Record<string, never>>, useSwagger: boolean, registrations?: BusinessLogicRegistrations): LibrarySourceFile[];
|
|
5
|
+
//# sourceMappingURL=doc.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.d.ts","sourceRoot":"","sources":["../../../src/lib/doc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAA+B,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAE3F,wBAAgB,cAAc,CAC5B,OAAO,EAAE,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,EACpD,UAAU,EAAE,OAAO,EACnB,aAAa,CAAC,EAAE,0BAA0B,GACzC,iBAAiB,EAAE,CA0BrB"}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { LibrarySourceFile } from "./interfaces.js";
|
|
2
|
+
export function getProjectDocs(emitter, useSwagger, registrations) {
|
|
3
|
+
const sourceFiles = [];
|
|
4
|
+
const mocks = registrations === undefined ? [] : [...registrations.entries()].flatMap((e) => e[1]);
|
|
5
|
+
sourceFiles.push(new LibrarySourceFile({
|
|
6
|
+
filename: `README.md`,
|
|
7
|
+
emitter: emitter,
|
|
8
|
+
getContents: () => (mocks.length > 0 ? getMockReadme(mocks) : getNoMockReadme()),
|
|
9
|
+
path: "..",
|
|
10
|
+
}), new LibrarySourceFile({
|
|
11
|
+
filename: `usage.md`,
|
|
12
|
+
emitter: emitter,
|
|
13
|
+
getContents: () => getUsageDoc(),
|
|
14
|
+
path: "../docs",
|
|
15
|
+
}), new LibrarySourceFile({
|
|
16
|
+
filename: `emitter.md`,
|
|
17
|
+
emitter: emitter,
|
|
18
|
+
getContents: () => getEmitterDoc(),
|
|
19
|
+
path: "../docs",
|
|
20
|
+
}));
|
|
21
|
+
return sourceFiles;
|
|
22
|
+
}
|
|
23
|
+
function getNoMockReadme() {
|
|
24
|
+
return `---
|
|
25
|
+
title: Next Steps
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# Next Steps
|
|
29
|
+
|
|
30
|
+
- Use the SwaggerUI endpoint to test out the running service
|
|
31
|
+
- Implement business logic interfaces for your operations
|
|
32
|
+
- Register each of your implementations as part of application startup
|
|
33
|
+
- Update development and production configuration to suit your needs
|
|
34
|
+
|
|
35
|
+
## More Information
|
|
36
|
+
|
|
37
|
+
- See [Code Layout](docs/usage.md) for information about the generated code
|
|
38
|
+
- See [Emitter Usage](docs/emitter.md) for details on how to use the emitter.
|
|
39
|
+
- File issues or provide feedback in [TypeSpec Issues](https://github.com/microsoft/typespec/issues/new/choose)
|
|
40
|
+
- Get information about Typespec on the [TypeSpec website](https://typespec.io)
|
|
41
|
+
`;
|
|
42
|
+
}
|
|
43
|
+
function getUsageDoc() {
|
|
44
|
+
return `---
|
|
45
|
+
title: Generated C-Sharp Overview
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
# Generated C-Sharp Overview
|
|
49
|
+
|
|
50
|
+
## Layout
|
|
51
|
+
|
|
52
|
+
The code layout inside the 'generated' folder is as follows:
|
|
53
|
+
|
|
54
|
+
- **generated**
|
|
55
|
+
|
|
56
|
+
- **controllers**: A set of ASP.Net core MVC controllers representing the operations in the spec, one for each interface or namespace with operations
|
|
57
|
+
- **lib**: A set of library files used in implementing generated models and controllers
|
|
58
|
+
- **models**: A set of models representing the data in requests and response
|
|
59
|
+
- **operations**: A set of interfaces called by the controllers, that should be implemented with the business logic for each operation.
|
|
60
|
+
|
|
61
|
+
You should recompile whenever you make changes in your TypeSpec and these files will be replaced inline to reflect the spec changes, without changing any of your hand-written implementation in the project.
|
|
62
|
+
|
|
63
|
+
## Scaffolding
|
|
64
|
+
|
|
65
|
+
If you use the scaffolding cli (hscs) or use the \`--emit-mocks "mocks-and-project-files"\` option on compilation, a
|
|
66
|
+
fully-functional .Net 9 project will be created with mock implementations of your business
|
|
67
|
+
logic, ready to compile and run.
|
|
68
|
+
|
|
69
|
+
The following additional files will be generated. It is expected that you will edit or replace these
|
|
70
|
+
files as you implement your service, so you should only regenerate them when needed.
|
|
71
|
+
To protect from inadvertently changing any edits you may have made to these files,
|
|
72
|
+
these files will be overwritten by the emitter unless you specify the \`--overwrite\` option.
|
|
73
|
+
|
|
74
|
+
- **ServiceProject.csproj**: The project file
|
|
75
|
+
- **Program.cs**: Entry point that sets up the app
|
|
76
|
+
- **appSettings.Development.json**: Configuration settings for the development environment
|
|
77
|
+
- **appSettings.json**: Configuration settings for the production environment
|
|
78
|
+
- **Properties**
|
|
79
|
+
- **launchSettings.json**: Launch configurations for the service (including local ports)
|
|
80
|
+
- **mocks**: Simple implementations of business logic interfaces that return simple responses.
|
|
81
|
+
this allows testing your service out before writing any implementation code.
|
|
82
|
+
|
|
83
|
+
- **MockRegistration.cs**: Called from the Program.cs startup, registers each of the business
|
|
84
|
+
logic implementations in the dependency injection container.
|
|
85
|
+
- **IInitializer.cs**: Interface used in the mocks to create responses.
|
|
86
|
+
- **Initializer.cs**: Implementation of the interface to create mock responses.
|
|
87
|
+
|
|
88
|
+
## SwaggerUI
|
|
89
|
+
|
|
90
|
+
If you include the \`@typespec/openapi3\` emitter in your typespec project, you can include a
|
|
91
|
+
SwaggerUI endpoint in the generated service using the \`--use-swaggerui\` option. This endpoint
|
|
92
|
+
provides a visual representation of operations and provides a web GUI client connected to the service that you can use right away to try out service operations.
|
|
93
|
+
|
|
94
|
+
## How Components Work Together
|
|
95
|
+
|
|
96
|
+
### Controllers
|
|
97
|
+
|
|
98
|
+
The generated controllers automatically listen at the routes you specified in TypeSpec. Controllers perform validation of input requests, call your implementation of business logic interfaces to perform the operation, and return the appropriate Http response.
|
|
99
|
+
|
|
100
|
+
### Business Logic Interfaces
|
|
101
|
+
|
|
102
|
+
You must implement business loginc interfaces to perform the work of each operation. There is one
|
|
103
|
+
business logic interface for each \`interface\` type in your spec, or for each namespace that contain operations. Business logic can assume that input types meet the constraints specified in TypeSpec and are responsible for returning the response type for the operation.
|
|
104
|
+
|
|
105
|
+
You can use the \`--emit-mocks\` option to emit mock implementations of your business logic, these mocks demonstrate a simple implementation that returns responses that match the response type in TypeSpec. They also show how to use \`IHttpContextAccessor\` to access additional details of the Http request and response.
|
|
106
|
+
|
|
107
|
+
### Discovery using the ASP.Net Core Dependency Injection Container
|
|
108
|
+
|
|
109
|
+
The Controllers find your business logic implementation through the ASP.Net dependency injection container. At server start, you register each of your implementations with the dependency injection container and they will automatically be instantiated and used by the controllers.
|
|
110
|
+
|
|
111
|
+
If you use the \`--emit-mocks\` option, sample code registering mock implementations is emitted to \`mocks/MockRegistration.cs\`.
|
|
112
|
+
|
|
113
|
+
### Models
|
|
114
|
+
|
|
115
|
+
Model classes represent the data passed in Http requests and response and the data that passes from the front end controllers to your business logic.
|
|
116
|
+
|
|
117
|
+
Models are partial, so you can add additional members for internal usage as needed by putting a partial class definition with additional members outside the \`generated\` folder in your project.
|
|
118
|
+
|
|
119
|
+
### Next Steps
|
|
120
|
+
|
|
121
|
+
After successful generation, you should:
|
|
122
|
+
|
|
123
|
+
- Use the SwaggerUI endpoint to test out the running service
|
|
124
|
+
- Implement the business logic interfaces for your operations
|
|
125
|
+
- Update MockRegistration.cs, or register each of your interfaces as part of application startup
|
|
126
|
+
- Update configuration to suit your needs
|
|
127
|
+
`;
|
|
128
|
+
}
|
|
129
|
+
function getEmitterDoc() {
|
|
130
|
+
return `---
|
|
131
|
+
title: "Emitter usage"
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# Emitter Usage
|
|
135
|
+
|
|
136
|
+
1. Via the command line
|
|
137
|
+
|
|
138
|
+
\`\`\`bash
|
|
139
|
+
tsp compile . --emit=@typespec/http-server-csharp
|
|
140
|
+
\`\`\`
|
|
141
|
+
|
|
142
|
+
2. Via the config
|
|
143
|
+
|
|
144
|
+
\`\`\`yaml
|
|
145
|
+
emit:
|
|
146
|
+
- "@typespec/http-server-csharp"
|
|
147
|
+
\`\`\`
|
|
148
|
+
|
|
149
|
+
The config can be extended with options as follows:
|
|
150
|
+
|
|
151
|
+
\`\`\`yaml
|
|
152
|
+
emit:
|
|
153
|
+
- "@typespec/http-server-csharp"
|
|
154
|
+
options:
|
|
155
|
+
"@typespec/http-server-csharp":
|
|
156
|
+
option: value
|
|
157
|
+
\`\`\`
|
|
158
|
+
|
|
159
|
+
## Emitter options
|
|
160
|
+
|
|
161
|
+
### \`skip-format\`
|
|
162
|
+
|
|
163
|
+
**Type:** \`boolean\`
|
|
164
|
+
|
|
165
|
+
Skips formatting of generated C# Types. By default, C# files are formatted using 'dotnet format'.
|
|
166
|
+
|
|
167
|
+
### \`output-type\`
|
|
168
|
+
|
|
169
|
+
**Type:** \`"models" | "all"\`
|
|
170
|
+
|
|
171
|
+
Chooses which service artifacts to emit. choices include 'models' or 'all' artifacts.
|
|
172
|
+
|
|
173
|
+
### \`emit-mocks\`
|
|
174
|
+
|
|
175
|
+
**Type:** \`"mocks-and-project-files" | "mocks-only" | "none"\`
|
|
176
|
+
|
|
177
|
+
Emits mock implementations of business logic, setup code, and project files enabling the service to respond to requests before a real implementation is provided
|
|
178
|
+
|
|
179
|
+
### \`use-swaggerui\`
|
|
180
|
+
|
|
181
|
+
**Type:** \`boolean\`
|
|
182
|
+
|
|
183
|
+
Configure a Swagger UI endpoint in the development configuration
|
|
184
|
+
|
|
185
|
+
### \`openapi-path\`
|
|
186
|
+
|
|
187
|
+
**Type:** \`string\`
|
|
188
|
+
|
|
189
|
+
Use openapi at the given path for generating SwaggerUI endpoints. By default, this will be 'openapi/openapi.yaml' if the 'use-swaggerui' option is enabled.
|
|
190
|
+
|
|
191
|
+
### \`overwrite\`
|
|
192
|
+
|
|
193
|
+
**Type:** \`boolean\`
|
|
194
|
+
|
|
195
|
+
When generating mock files, setup code, and project files overwrite any existing files with the same name.
|
|
196
|
+
|
|
197
|
+
### \`project-name\`
|
|
198
|
+
|
|
199
|
+
**Type:** \`string\`
|
|
200
|
+
|
|
201
|
+
The name of the generated project.
|
|
202
|
+
|
|
203
|
+
### \`http-port\`
|
|
204
|
+
|
|
205
|
+
**Type:** \`number\`
|
|
206
|
+
|
|
207
|
+
The service http port when hosting the project locally.
|
|
208
|
+
|
|
209
|
+
### \`https-port\`
|
|
210
|
+
|
|
211
|
+
**Type:** \`number\`
|
|
212
|
+
|
|
213
|
+
The service https port when hosting the project locally.
|
|
214
|
+
`;
|
|
215
|
+
}
|
|
216
|
+
function getMockReadme(mocks) {
|
|
217
|
+
return `---
|
|
218
|
+
title: Next Steps
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
# Next Steps
|
|
222
|
+
|
|
223
|
+
- Use the SwaggerUI endpoint to test out the running service
|
|
224
|
+
- Update business logic mocks with real business logic
|
|
225
|
+
${mocks.flatMap((m) => ` - \`mocks/${m.className}.cs\``).join("\n")}
|
|
226
|
+
- Update \`mocks/MockRegistration.cs\` if you update the constructor of business logic implementations.
|
|
227
|
+
- Update development and production configuration to suit your needs
|
|
228
|
+
|
|
229
|
+
## More Information
|
|
230
|
+
|
|
231
|
+
- See [Code Layout](docs/usage.md) for information about the generated code
|
|
232
|
+
- See [Emitter Usage](docs/emitter.md) for details on how to use the emitter.
|
|
233
|
+
- File issues or provide feedback in [TypeSpec Issues](https://github.com/microsoft/typespec/issues/new/choose)
|
|
234
|
+
- Get information about Typespec on the [TypeSpec website](https://typespec.io)
|
|
235
|
+
`;
|
|
236
|
+
}
|
|
237
|
+
//# sourceMappingURL=doc.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"doc.js","sourceRoot":"","sources":["../../../src/lib/doc.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAGpD,MAAM,UAAU,cAAc,CAC5B,OAAoD,EACpD,UAAmB,EACnB,aAA0C;IAE1C,MAAM,WAAW,GAAwB,EAAE,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ACF,CAAC;AACD,SAAS,aAAa,CAAC,KAAoC;IACzD,OAAO;;;;;;;;EAQP,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,eAAe,CAAC,CAAC,SAAS,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;;;;;;CAUnE,CAAC;AACF,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { AssetEmitter, Context, EmittedSourceFile, EmitterOutput, Scope, SourceF
|
|
|
2
2
|
import { Model } from "@typespec/compiler";
|
|
3
3
|
import { HttpStatusCodeRange } from "@typespec/http";
|
|
4
4
|
import { HttpRequestParameterKind } from "@typespec/http/experimental/typekit";
|
|
5
|
+
import { CSharpServiceEmitterOptions } from "./lib.js";
|
|
5
6
|
export declare const HelperNamespace: string;
|
|
6
7
|
export interface CSharpTypeMetadata {
|
|
7
8
|
name: string;
|
|
@@ -133,9 +134,11 @@ export declare class LibrarySourceFile {
|
|
|
133
134
|
constructor(params: {
|
|
134
135
|
filename: string;
|
|
135
136
|
getContents: () => string;
|
|
136
|
-
emitter: AssetEmitter<string,
|
|
137
|
+
emitter: AssetEmitter<string, CSharpServiceEmitterOptions>;
|
|
137
138
|
path?: string;
|
|
139
|
+
conditional?: boolean;
|
|
138
140
|
});
|
|
141
|
+
conditional: boolean;
|
|
139
142
|
filename: string;
|
|
140
143
|
source: SourceFile<string>;
|
|
141
144
|
emitted: EmittedSourceFile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/lib/interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,OAAO,EACP,iBAAiB,EACjB,aAAa,EACb,KAAK,EACL,UAAU,EACX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,wBAAw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,SAAS,IAAA;IACT,SAAS,IAAA;IACT,QAAQ,IAAA;IACR,QAAQ,IAAA;CACT;AAED,qBAAa,iBAAiB;gBAChB,MAAM,EAAE;QAClB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,MAAM,MAAM,CAAC;QAC1B,OAAO,EAAE,YAAY,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;QAC3D,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,OAAO,CAAC;KACvB;IAaD,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,iBAAiB,EAAE,wBAAwB,CAAC;IAC5C,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,eAAe,GAAG,KAAK,CAAC;IAChD,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC"}
|
|
@@ -214,14 +214,18 @@ export var NameCasingType;
|
|
|
214
214
|
})(NameCasingType || (NameCasingType = {}));
|
|
215
215
|
export class LibrarySourceFile {
|
|
216
216
|
constructor(params) {
|
|
217
|
-
this.path = params.path
|
|
217
|
+
this.path = params.path || "lib/";
|
|
218
218
|
this.filename = params.filename;
|
|
219
|
-
|
|
219
|
+
const source = params.emitter.createSourceFile(`${this.path}/${this.filename}`);
|
|
220
|
+
this.conditional = params.conditional || false;
|
|
220
221
|
this.emitted = {
|
|
221
|
-
path:
|
|
222
|
+
path: source.path,
|
|
222
223
|
contents: params.getContents(),
|
|
223
224
|
};
|
|
225
|
+
source.meta = { emitted: this.emitted, conditional: this.conditional };
|
|
226
|
+
this.source = source;
|
|
224
227
|
}
|
|
228
|
+
conditional;
|
|
225
229
|
filename;
|
|
226
230
|
source;
|
|
227
231
|
emitted;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/lib/interfaces.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/lib/interfaces.ts"],"names":[],"mappings":"AAaA,MAAM,CAAC,MAAM,eAAe,GAAW,iCAAiC,CAAC;AAazE,MAAM,OAAO,UAAU;IACrB,IAAI,CAAS;IACb,SAAS,CAAS;IAClB,SAAS,CAAU;IACnB,WAAW,CAAU;IACrB,UAAU,CAAU;IACpB,OAAO,CAAU;IACjB,YAAY,CAAU;IAEtB,YAAmB,KAQlB;QACC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,KAAK,QAAQ,CAAC;QAChG,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC;QAC/E,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;QAC5E,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,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