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",