-
Notifications
You must be signed in to change notification settings - Fork 230
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #3141 --------- Co-authored-by: Timothee Guerin <[email protected]> Co-authored-by: Timothee Guerin <[email protected]>
- Loading branch information
1 parent
325cb47
commit 53b7a8a
Showing
21 changed files
with
4,448 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
# Change versionKind to one of: internal, fix, dependencies, feature, deprecation, breaking | ||
changeKind: internal | ||
packages: | ||
- "@typespec/http-server-csharp" | ||
--- | ||
|
||
Initial check-in for CSharp service emitter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Change Log - @typespec/http-server-csharp | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# @typespec/http-server-csharp | ||
|
||
TypeSpec service code generator for c-sharp | ||
|
||
## Install | ||
|
||
```bash | ||
npm install @typespec/http-server-csharp | ||
``` | ||
|
||
## Emitter | ||
|
||
### Usage | ||
|
||
1. Via the command line | ||
|
||
```bash | ||
tsp compile . --emit=@typespec/http-server-csharp | ||
``` | ||
|
||
2. Via the config | ||
|
||
```yaml | ||
emit: | ||
- "@typespec/http-server-csharp" | ||
``` | ||
### Emitter options | ||
#### `skip-format` | ||
|
||
**Type:** `boolean` | ||
|
||
Skips formatting of generated C# Types. By default, C# files are formatted using 'dotnet format'. | ||
|
||
#### `output-type` | ||
|
||
**Type:** `"models" | "all"` | ||
|
||
Chooses which service artifacts to emit. choices include 'models' or 'all' artifacts. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
{ | ||
"name": "@typespec/http-server-csharp", | ||
"version": "0.58.0-alpha.1", | ||
"author": "Microsoft Corporation", | ||
"description": "TypeSpec service code generator for c-sharp", | ||
"homepage": "https://typespec.io", | ||
"readme": "https://github.com/microsoft/typespec/blob/main/packages/http-server-csharp/README.md", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/microsoft/typespec.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/microsoft/typespec/issues" | ||
}, | ||
"keywords": [ | ||
"typespec", | ||
"service", | ||
"c-sharp" | ||
], | ||
"type": "module", | ||
"main": "dist/src/index.js", | ||
"exports": { | ||
".": { | ||
"types": "./dist/src/index.d.ts", | ||
"default": "./dist/src/index.js" | ||
}, | ||
"./testing": { | ||
"types": "./dist/src/testing/index.d.ts", | ||
"default": "./dist/src/testing/index.js" | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=18.0.0" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf ./dist ./temp", | ||
"build": "tsc -p .", | ||
"watch": "tsc -p . --watch", | ||
"test": "vitest run", | ||
"test:watch": "vitest -w", | ||
"test:ui": "vitest --ui", | ||
"test:ci": "vitest run --coverage --reporter=junit --reporter=default", | ||
"lint": "eslint . --max-warnings=0", | ||
"lint:fix": "eslint . --fix", | ||
"regen-docs": "echo No doc generation for alpha version" | ||
}, | ||
"files": [ | ||
"lib/*.tsp", | ||
"dist/**", | ||
"!dist/test/**" | ||
], | ||
"peerDependencies": { | ||
"@typespec/compiler": "workspace:~", | ||
"@typespec/rest": "workspace:~", | ||
"@typespec/http": "workspace:~", | ||
"@typespec/versioning": "workspace:~" | ||
}, | ||
"dependencies": { | ||
"change-case": "~5.4.4" | ||
}, | ||
"devDependencies": { | ||
"@typespec/compiler": "workspace:~", | ||
"@typespec/openapi": "workspace:~", | ||
"@typespec/rest": "workspace:~", | ||
"@typespec/http": "workspace:~", | ||
"@types/node": "~18.11.19", | ||
"@typespec/library-linter": "workspace:~", | ||
"@typespec/tspd": "workspace:~", | ||
"@vitest/coverage-v8": "^2.0.4", | ||
"@vitest/ui": "^2.0.4", | ||
"c8": "^10.1.2", | ||
"rimraf": "~6.0.1", | ||
"typescript": "~5.5.4", | ||
"vitest": "^2.0.4" | ||
} | ||
} |
Oops, something went wrong.