import { defineConfig } from 'orval';

export default defineConfig({
  ocdp: {
    input: {
      target: '../backend/docs/openapi.yaml',
    },
    output: {
      target: './src/api/generated-orval/api.ts',
      client: 'axios-functions',
      mode: 'split',
      override: {
        mutator: {
          path: './src/api/axios-mutator.ts',
          name: 'customAxiosInstance',
        },
        useDates: true,
        useNamedParameters: true,
      },
      tsconfig: './tsconfig.json',
      clean: true,
    },
  },
});

