Skip to content

Commit 172bf6d

Browse files
committed
fix: fix common validation schema imports
1 parent eb45d7f commit 172bf6d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/schema-to-typescript/common/client-core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function processCoreFile(
1414
return renderTypeScript(
1515
parse(
1616
code.replace(
17-
/import(.*?)from '.\/([^']+)';/g,
17+
/import([\s\S]*?)from '.\/([^']+)';/g,
1818
(_, imports, path) =>
1919
`import${imports}from ${JSON.stringify(`./${formatFilename(path, filenameFormat)}`)};`
2020
),

test/pet-store/api-typescript-generator-config.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ export default async function (): Promise<ApiTypescriptGeneratorConfig> {
2525
},
2626
postprocess: {
2727
eslint: true
28+
},
29+
core: {
30+
cleanupFiles: true
31+
},
32+
models: {
33+
cleanupFiles: true
34+
},
35+
services: {
36+
cleanupFiles: true
2837
}
2938
}
3039
]

0 commit comments

Comments
 (0)