Skip to content

Commit b47da78

Browse files
committed
fix: relative imports
1 parent 382b3de commit b47da78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/openapi-code-generator/src/typescript/typescript-nextjs/typescript-nextjs.generator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,18 +428,18 @@ export async function generateTypescriptNextJS(
428428
: ""
429429

430430
const appDirectory = ["./app", subDirectory].filter(isDefined).join(path.sep)
431-
const routesDirectory = ["./generated", subDirectory]
431+
const generatedDirectory = ["./generated", subDirectory]
432432
.filter(isDefined)
433433
.join(path.sep)
434434

435435
const rootTypeBuilder = await TypeBuilder.fromInput(
436-
"./generated/api/models.ts",
436+
[generatedDirectory, "models.ts"].join(path.sep),
437437
input,
438438
config.compilerOptions,
439439
)
440440

441441
const rootSchemaBuilder = await schemaBuilderFactory(
442-
"./generated/api/schemas.ts",
442+
[generatedDirectory, "schemas.ts"].join(path.sep),
443443
input,
444444
config.schemaBuilder,
445445
)
@@ -450,7 +450,7 @@ export async function generateTypescriptNextJS(
450450
await Promise.all(
451451
input.groupedOperations("route").map(async (group) => {
452452
const filename = path.join(
453-
routesDirectory,
453+
generatedDirectory,
454454
routeToNextJSFilepath(group.name),
455455
)
456456

0 commit comments

Comments
 (0)