diff --git a/modules/swagger-codegen/src/main/resources/typescript-node/package.mustache b/modules/swagger-codegen/src/main/resources/typescript-node/package.mustache index 96714500208..0d419996ed6 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-node/package.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-node/package.mustache @@ -2,12 +2,14 @@ "name": "{{npmName}}", "version": "{{npmVersion}}", "description": "NodeJS client for {{npmName}}", + "repository": "{{gitUserId}}/{{gitRepoId}}", "main": "api.js", "scripts": { + "clean": "rm -Rf node_modules/ typings/ *.js", "build": "typings install && tsc" }, "author": "Swagger Codegen Contributors", - "license": "MIT", + "license": "Apache-2.0", "dependencies": { "bluebird": "^3.3.5", "request": "^2.72.0" diff --git a/samples/client/petstore/typescript-node/npm/.swagger-codegen-ignore b/samples/client/petstore/typescript-node/npm/.swagger-codegen-ignore new file mode 100644 index 00000000000..7810b90fab5 --- /dev/null +++ b/samples/client/petstore/typescript-node/npm/.swagger-codegen-ignore @@ -0,0 +1,2 @@ +tsconfig.json +package.json diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index cc9b954165b..568335b5769 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -131,8 +131,8 @@ export class PetApi { protected authentications = { 'default': new VoidAuth(), - 'petstore_auth': new OAuth(), 'api_key': new ApiKeyAuth('header', 'api_key'), + 'petstore_auth': new OAuth(), } constructor(basePath?: string); @@ -398,10 +398,10 @@ export class PetApi { json: true, }; - this.authentications.petstore_auth.applyToRequest(requestOptions); - this.authentications.api_key.applyToRequest(requestOptions); + this.authentications.petstore_auth.applyToRequest(requestOptions); + this.authentications.default.applyToRequest(requestOptions); if (Object.keys(formParams).length) { @@ -610,8 +610,8 @@ export class StoreApi { protected authentications = { 'default': new VoidAuth(), - 'petstore_auth': new OAuth(), 'api_key': new ApiKeyAuth('header', 'api_key'), + 'petstore_auth': new OAuth(), } constructor(basePath?: string); @@ -847,8 +847,8 @@ export class UserApi { protected authentications = { 'default': new VoidAuth(), - 'petstore_auth': new OAuth(), 'api_key': new ApiKeyAuth('header', 'api_key'), + 'petstore_auth': new OAuth(), } constructor(basePath?: string); diff --git a/samples/client/petstore/typescript-node/npm/package.json b/samples/client/petstore/typescript-node/npm/package.json index f0774593f22..e07e1bfbbf5 100644 --- a/samples/client/petstore/typescript-node/npm/package.json +++ b/samples/client/petstore/typescript-node/npm/package.json @@ -1,15 +1,16 @@ { "name": "@swagger/angular2-typescript-petstore", - "version": "0.0.1-SNAPSHOT.201605031634", + "version": "0.0.1-SNAPSHOT.201605191812", "description": "NodeJS client for @swagger/angular2-typescript-petstore", + "repository": "GIT_USER_ID/GIT_REPO_ID", "main": "api.js", "scripts": { + "clean": "rm -Rf node_modules/ typings/ *.js", "build": "typings install && tsc", - "test": "tsc && node client.js", - "clean": "rm -Rf node_modules/ typings/ *.js" + "test": "tsc && node client.js" }, "author": "Swagger Codegen Contributors", - "license": "MIT", + "license": "Apache-2.0", "dependencies": { "bluebird": "^3.3.5", "request": "^2.72.0"