Skip to content

Commit 016481e

Browse files
committed
fix: node require alias default value
1 parent 0b6f524 commit 016481e

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

bin/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (OpenAPI) {
3535
exportServices: JSON.parse(program.exportServices) === true,
3636
exportModels: JSON.parse(program.exportModels) === true,
3737
exportSchemas: JSON.parse(program.exportSchemas) === true,
38-
apiAlias: program.apiAlias
38+
apiAlias: program.apiAlias || '../core/request'
3939
})
4040
.then(() => {
4141
process.exit(0);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openapi-typescript-codegen",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "NodeJS library that generates Typescript or Javascript clients based on the OpenAPI specification.",
55
"author": "zengxiangda",
66
"homepage": "http://gitlab.psf-dev.com/frontend/openapi-typescritp-codegen",

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function generate({
5454
exportModels = true,
5555
exportSchemas = false,
5656
write = true,
57-
apiAlias,
57+
apiAlias = '../core/request',
5858
}: Options): Promise<void> {
5959
const openApi = isString(input) ? await getOpenApiSpec(input) : input;
6060
const openApiVersion = getOpenApiVersion(openApi);

0 commit comments

Comments
 (0)