import { defineConfig } from 'orval'; // Generates a typed fetch-based client under src/generated/ from openapi.json. // Consumers import the generated functions/types directly — never hand-roll // fetches for documented endpoints (see CLAUDE.md: DRY-via-Orval). // // Regenerate with `npm run codegen` (fetches openapi.json from a running // test backend first). export default defineConfig({ app: { input: { target: './openapi.json' }, output: { mode: 'split', target: './src/generated/api.ts', schemas: './src/generated/models', client: 'fetch', baseUrl: { getBaseUrlFromSpecification: false }, httpClient: 'fetch', override: { mutator: { path: './src/core-fetch.ts', name: 'coreFetch', }, }, }, }, });