aboutsummaryrefslogtreecommitdiff
path: root/orval.config.ts
blob: 7151ef3e421c7066b5ce800273469415f8a3d7c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import { defineConfig } from 'orval';

export default defineConfig({
  pantry: {
    input: './src/conf/openapi-pantry.yaml',
    output: {
        mode: "tags",
        workspace: "./src",
        target: "./util/pantry.ts",
        schemas: "./model",
        client: "react-query",
        prettier: true,
        override: {
            useDates: true,
            mutator: {
                path: "./conf/mutator.ts",
                name: "useMutator",
            },
            query: {
                useQuery: true,
            },
        },
    },
    hooks: {
      afterAllFilesWrite: 'prettier --write',
    },
  },
});