Closed fredericgrati closed 3 months ago
import { defineConfig } from 'orval'; export default defineConfig({ petstore: { output: { mode: 'tags-split', workspace: 'generated', target: './petstore.ts', client: 'hono', override: { hono: { handlers: 'src/handlers', }, zod: { strict: { response: true, }, preprocess: { response: { name: 'stripNill', path: './src/mutators.ts', }, }, }, }, }, input: { target: './petstore.yaml', }, }, });
The handler import in the route generated file is not correct.
import { listPetsHandlers } from '../src/handlers/listPets';
The handler import in the route generated file should be:
import { listPetsHandlers } from '../../src/handlers/listPets';
System: OS: macOS 14.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 95.72 MB / 16.00 GB Shell: 5.9 - /bin/zsh
What are the steps to reproduce this issue?
What happens?
The handler import in the route generated file is not correct.
import { listPetsHandlers } from '../src/handlers/listPets';
What were you expecting to happen?
The handler import in the route generated file should be:
import { listPetsHandlers } from '../../src/handlers/listPets';
Any logs, error output, etc?
Any other comments?
What versions are you using?
System: OS: macOS 14.4.1 CPU: (10) arm64 Apple M2 Pro Memory: 95.72 MB / 16.00 GB Shell: 5.9 - /bin/zsh