[BUG][typescript-node] Generated package causes compilation errors (#1911)

* changed typescript-node build dir

* fixed missed json

* to pass integration test
This commit is contained in:
na-o-ys 2019-01-16 11:58:49 +09:00 committed by William Cheng
parent e0137f670c
commit 4117b2ebb1
7 changed files with 22 additions and 12 deletions

View File

@ -0,0 +1,6 @@
{
"npmName": "@swagger/node-typescript-petstore",
"npmVersion": "0.0.1",
"npmRepository": "https://skimdb.npmjs.com/registry",
"snapshot": false
}

View File

@ -27,6 +27,6 @@ fi
# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-node -c bin/typescript-petstore-npm.json -o samples/client/petstore/typescript-node/npm $@"
ags="generate -i modules/openapi-generator/src/test/resources/2_0/petstore.yaml -g typescript-node -c bin/typescript-node-petstore-npm.json -o samples/client/petstore/typescript-node/npm $@"
java $JAVA_OPTS -jar $executable $ags

View File

@ -5,6 +5,6 @@ If Not Exist %executable% (
)
REM set JAVA_OPTS=%JAVA_OPTS% -Xmx1024M
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-petstore-npm.json -g typescript-node -o samples\client\petstore\typescript-node\npm
set ags=generate -i modules\openapi-generator\src\test\resources\2_0\petstore.yaml -c bin\typescript-node-petstore-npm.json -g typescript-node -o samples\client\petstore\typescript-node\npm
java %JAVA_OPTS% -jar %executable% %ags%

View File

@ -3,12 +3,12 @@
"version": "{{npmVersion}}",
"description": "NodeJS client for {{npmName}}",
"repository": "{{gitUserId}}/{{gitRepoId}}",
"main": "api.js",
"types": "api.d.ts",
"main": "dist/api.js",
"types": "dist/api.d.ts",
"scripts": {
"clean": "rm -Rf node_modules/ *.js",
"build": "tsc",
"test": "npm run build && node client.js"
"test": "npm run build && node dist/client.js"
},
"author": "OpenAPI-Generator Contributors",
"license": "Unlicense",

View File

@ -10,9 +10,11 @@
"sourceMap": true,
"noLib": false,
"declaration": true,
"lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"]
"lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"],
"outDir": "dist"
},
"exclude": [
"dist",
"node_modules"
]
}

View File

@ -1,14 +1,14 @@
{
"name": "@swagger/angular2-typescript-petstore",
"name": "@swagger/node-typescript-petstore",
"version": "0.0.1",
"description": "NodeJS client for @swagger/angular2-typescript-petstore",
"description": "NodeJS client for @swagger/node-typescript-petstore",
"repository": "GIT_USER_ID/GIT_REPO_ID",
"main": "api.js",
"types": "api.d.ts",
"main": "dist/api.js",
"types": "dist/api.d.ts",
"scripts": {
"clean": "rm -Rf node_modules/ *.js",
"build": "tsc",
"test": "npm run build && node client.js"
"test": "npm run build && node dist/client.js"
},
"author": "OpenAPI-Generator Contributors",
"license": "Unlicense",

View File

@ -10,9 +10,11 @@
"sourceMap": true,
"noLib": false,
"declaration": true,
"lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"]
"lib": ["dom", "es6", "es5", "dom.iterable", "scripthost"],
"outDir": "dist"
},
"exclude": [
"dist",
"node_modules"
]
}