From 6ab69e4141f0a2412b59f3880a40f5270b3158a0 Mon Sep 17 00:00:00 2001 From: supmiku39 Date: Wed, 15 Apr 2020 07:56:12 +0900 Subject: [PATCH] fix api-codegen -s not working bug --- dist/codegen.js | 2 +- lib/codegen.ts | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dist/codegen.js b/dist/codegen.js index d6d697e..ccb1ffb 100644 --- a/dist/codegen.js +++ b/dist/codegen.js @@ -297,7 +297,7 @@ function codegenSchemas(schemas, config, cp) { } function codegen(openAPI, configUser) { var _a; - var config = Object.assign({}, configUser, Config_1.configDefault); + var config = Object.assign({}, Config_1.configDefault, configUser); // prepare fs.mkdirSync(config.outputDir, { recursive: true }); var apiFuncs = OpenAPI_1.apiFunctionsOf(openAPI); diff --git a/lib/codegen.ts b/lib/codegen.ts index 3fd394f..fe90fe6 100644 --- a/lib/codegen.ts +++ b/lib/codegen.ts @@ -287,7 +287,7 @@ function codegenSchemas(schemas: Schemas, config: Config, cp: CodePrinter) { } export default function codegen(openAPI: OpenAPI, configUser: ConfigUser) { - const config: Config = Object.assign({}, configUser, configDefault); + const config: Config = Object.assign({}, configDefault, configUser); // prepare fs.mkdirSync(config.outputDir, {recursive: true}); const apiFuncs = apiFunctionsOf(openAPI); diff --git a/package.json b/package.json index a425c2c..3966da9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@supmiku39/api-ts-gen", - "version": "2.0.0", + "version": "2.0.0-fix01", "description": "OpenAPI code generator for TypeScript", "main": "dist/index.js", "types": "dist/index.d.ts",