Skip to content

Commit cd56d1c

Browse files
authored
feat(core): generate typescript models from swagger/openapi project (#447)
This is experimental, and currently disabled by default.
1 parent e4365a9 commit cd56d1c

File tree

96 files changed

+3905
-235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3905
-235
lines changed

.config/dotnet-tools.json

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

.eslintrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@
3232
"files": ["*.js", "*.jsx"],
3333
"extends": ["plugin:@nrwl/nx/javascript"],
3434
"rules": {}
35+
},
36+
{
37+
"files": "*.json",
38+
"parser": "jsonc-eslint-parser",
39+
"rules": {}
3540
}
3641
]
3742
}

.nx-dotnet.rc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"nugetPackages": {}
3+
}

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@
3434
"orderLevel": 40
3535
}
3636
],
37-
"liveServer.settings.port": 5501
37+
"liveServer.settings.port": 5501,
38+
"eslint.validate": ["json"]
3839
}

demo/apps/web-frontend/.babelrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"presets": [
3+
[
4+
"@nrwl/react/babel",
5+
{
6+
"runtime": "automatic"
7+
}
8+
]
9+
],
10+
"plugins": []
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# This file is used by:
2+
# 1. autoprefixer to adjust CSS to support the below specified browsers
3+
# 2. babel preset-env to adjust included polyfills
4+
#
5+
# For additional information regarding the format and rule options, please see:
6+
# https://github.com/browserslist/browserslist#queries
7+
#
8+
# If you need to support different browsers in production, you may tweak the list below.
9+
10+
last 1 Chrome version
11+
last 1 Firefox version
12+
last 2 Edge major versions
13+
last 2 Safari major version
14+
last 2 iOS major versions
15+
Firefox ESR
16+
not IE 9-11 # For IE 9-11 support, remove 'not'.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"extends": ["plugin:@nrwl/nx/react", "../../../.eslintrc.json"],
3+
"ignorePatterns": ["!**/*"],
4+
"overrides": [
5+
{
6+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
7+
"rules": {}
8+
},
9+
{
10+
"files": ["*.ts", "*.tsx"],
11+
"rules": {}
12+
},
13+
{
14+
"files": ["*.js", "*.jsx"],
15+
"rules": {}
16+
}
17+
]
18+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/* eslint-disable */
2+
export default {
3+
displayName: 'demo-web-frontend',
4+
preset: '../../../jest.preset.js',
5+
transform: {
6+
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
7+
'^.+\\.[tj]sx?$': 'babel-jest',
8+
},
9+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
10+
coverageDirectory: '../../coverage//demo/apps/web-frontend',
11+
};
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
3+
"sourceRoot": "demo/apps/web-frontend/src",
4+
"projectType": "application",
5+
"targets": {
6+
"build": {
7+
"executor": "@nrwl/web:webpack",
8+
"outputs": ["{options.outputPath}"],
9+
"defaultConfiguration": "production",
10+
"options": {
11+
"compiler": "babel",
12+
"outputPath": "dist/demo/apps/web-frontend",
13+
"index": "demo/apps/web-frontend/src/index.html",
14+
"baseHref": "/",
15+
"main": "demo/apps/web-frontend/src/main.tsx",
16+
"polyfills": "demo/apps/web-frontend/src/polyfills.ts",
17+
"tsConfig": "demo/apps/web-frontend/tsconfig.app.json",
18+
"assets": [
19+
"demo/apps/web-frontend/src/favicon.ico",
20+
"demo/apps/web-frontend/src/assets"
21+
],
22+
"styles": ["demo/apps/web-frontend/src/styles.scss"],
23+
"scripts": [],
24+
"webpackConfig": "@nrwl/react/plugins/webpack"
25+
},
26+
"configurations": {
27+
"production": {
28+
"fileReplacements": [
29+
{
30+
"replace": "demo/apps/web-frontend/src/environments/environment.ts",
31+
"with": "demo/apps/web-frontend/src/environments/environment.prod.ts"
32+
}
33+
],
34+
"optimization": true,
35+
"outputHashing": "all",
36+
"sourceMap": false,
37+
"namedChunks": false,
38+
"extractLicenses": true,
39+
"vendorChunk": false
40+
},
41+
"development": {
42+
"extractLicenses": false,
43+
"optimization": false,
44+
"sourceMap": true,
45+
"vendorChunk": true
46+
}
47+
}
48+
},
49+
"serve": {
50+
"executor": "@nrwl/web:dev-server",
51+
"options": {
52+
"buildTarget": "demo-web-frontend:build",
53+
"hmr": true
54+
},
55+
"configurations": {
56+
"production": {
57+
"buildTarget": "demo-web-frontend:build:production",
58+
"hmr": false
59+
},
60+
"development": {
61+
"buildTarget": "demo-web-frontend:build:development"
62+
}
63+
},
64+
"defaultConfiguration": "development"
65+
},
66+
"lint": {
67+
"executor": "@nrwl/linter:eslint",
68+
"outputs": ["{options.outputFile}"],
69+
"options": {
70+
"lintFilePatterns": ["demo/apps/web-frontend/**/*.{ts,tsx,js,jsx}"]
71+
}
72+
},
73+
"test": {
74+
"executor": "@nrwl/jest:jest",
75+
"outputs": ["coveragedemo/apps/web-frontend"],
76+
"options": {
77+
"jestConfig": "demo/apps/web-frontend/jest.config.ts",
78+
"passWithNoTests": true
79+
}
80+
}
81+
},
82+
"tags": []
83+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/* Your styles goes here. */

0 commit comments

Comments
 (0)