import { defineConfig } from 'orval' export default defineConfig({ baca: { input: './scripts/data/swagger-spec.json', output: { mode: 'tags-split', target: 'src/api/query/model.ts', schemas: 'src/api/types', client: 'react-query', // solution for not working mocked data on mobile - it removes automatically added "*" to address url at the beginning mock: { type: 'msw', }, clean: true, prettier: true, override: { header: (info) => [ `eslint-disable @typescript-eslint/no-explicit-any`, `Generated by orval 🍺`, `Do not edit manually.`, ...(info.title ? [info.title] : []), ...(info.description ? [info.description] : []), ...(info.version ? [`OpenAPI spec version: ${info.version}`] : []), ], mutator: { path: './src/api/axios/custom-instance.ts', name: 'customInstance', }, }, }, hooks: { afterAllFilesWrite: 'yarn lint:fix', }, }, })