Skip to content

Commit 93b1c01

Browse files
Update README, add vscode settings, prettier and install Swashbuckle.AspNetCore.Cli
1 parent 4d1fbef commit 93b1c01

File tree

5 files changed

+75
-5
lines changed

5 files changed

+75
-5
lines changed

.config/dotnet-tools.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1-
{
2-
"version": 1,
3-
"isRoot": true,
4-
"tools": {}
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"swashbuckle.aspnetcore.cli": {
6+
"version": "6.1.5",
7+
"commands": [
8+
"swagger"
9+
]
10+
}
11+
}
512
}

.prettierrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"singleQuote": true,
3+
"tabWidth": 2,
4+
"printWidth": 80,
5+
"useTabs": false,
6+
"overrides": [
7+
{
8+
"files": "*.md",
9+
"options": {
10+
"tabWidth": 2
11+
}
12+
},
13+
{
14+
"files": "*.yml",
15+
"options": {
16+
"tabWidth": 2
17+
}
18+
}
19+
]
20+
}

.vscode/extensions.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"recommendations": [
3+
"EditorConfig.EditorConfig",
4+
"ms-dotnettools.csharp",
5+
"streetsidesoftware.code-spell-checker",
6+
"esbenp.prettier-vscode",
7+
"ms-azure-devops.azure-pipelines"
8+
]
9+
}

.vscode/settings.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"omnisharp.enableRoslynAnalyzers": true,
3+
"omnisharp.enableEditorConfigSupport": true,
4+
"editor.formatOnSave": true,
5+
"[markdown]": {
6+
"editor.defaultFormatter": "esbenp.prettier-vscode"
7+
},
8+
"[json]": {
9+
"editor.defaultFormatter": "esbenp.prettier-vscode"
10+
},
11+
"[jsonc]": {
12+
"editor.defaultFormatter": "esbenp.prettier-vscode"
13+
},
14+
"[yaml]": {
15+
"editor.defaultFormatter": "esbenp.prettier-vscode"
16+
},
17+
"[xml]": {
18+
"editor.defaultFormatter": "esbenp.prettier-vscode"
19+
},
20+
"cSpell.language": "en-GB",
21+
"cSpell.words": []
22+
}

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# openapi-typescript-fetch-example
22

3+
A simple project that demonstrates:
4+
5+
- How generate a typed HTTP client from an OpenAPI definition using the `typescript-fetch` template
6+
- How to consume the HTTP client
7+
38
## Project Overview
49

510
```console
@@ -15,8 +20,15 @@ dotnet new tool-manifest
1520
dotnet new nugetconfig
1621
dotnet tool install Swashbuckle.AspNetCore.Cli
1722
dotnet new sln --name OpenAPITypeScriptFetchExample
18-
dotnet new webapi -o WebAPI
23+
dotnet new webapi -o WebAPI
1924
dotnet sln add WebAPI
2025

2126
# .editorconfig config manually created from https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/code-style-rule-options
2227
```
28+
29+
## TODO
30+
31+
- [ ] Add bearer token auth to .NET project
32+
- [ ] Setup TS project in `./Client`
33+
- [ ] Generate HTTP client from OpenAPI spec
34+
- [ ] Show usage of HTTP client including token renewal in middleware

0 commit comments

Comments
 (0)