diff options
-rw-r--r-- | openapitools.json | 20 | ||||
-rw-r--r-- | package.json | 3 |
2 files changed, 22 insertions, 1 deletions
diff --git a/openapitools.json b/openapitools.json new file mode 100644 index 0000000..7e616af --- /dev/null +++ b/openapitools.json @@ -0,0 +1,20 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "6.6.0", + "generators": { + "v3.0": { + "generatorName": "typescript-angular", + "inputSpec": "openapi/input/api.yaml", + "output": "openapi/output", + "additionalProperties": { + "ngVersion": "12.1.0", + "modelFileSuffix": ".model", + "fileNaming": "camelCase", + "enumPropertyNaming": "UPPERCASE" + } + } + } + } +} diff --git a/package.json b/package.json index b1e036e..e8d7439 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "frontend", "version": "0.0.0", "scripts": { - "openapi": "rm -rf ./openapi/output && bash ./openapi/openapi-generator-cli generate -i ./openapi/input/api.yaml -g typescript-angular -o ./openapi/output -c ./openapi/config.json", + "openapi": "openapi-generator-cli generate --generator-key v3.0", "ng": "./node-modules/.bin/ng", "prestart": "npm run openapi", "start": "ng serve -- --proxy-config staging.proxy.config.json --host 0.0.0.0 --port 80 --disable-host-check", @@ -53,6 +53,7 @@ "@angular-eslint/template-parser": "13.2.1", "@angular/cli": "13.3.7", "@angular/compiler-cli": "13.3.10", + "@openapitools/openapi-generator-cli": "^2.6.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "2.0.3", "@types/lodash": "^4.14.188", |