1 const faker = require('faker');
2
3 module.exports = {
4 petstore: {
5 output: {
6 mode: 'split',
7 target: 'src/petstore.ts',
8 schemas: 'src/model',
9 client: 'react-query',
10 mock: true,
11 override: {
12 operations: {
13 listPets: {
14 mutator: 'src/response-type.js',
15 mock: {
16 properties: () => {
17 return {
18 id: () => faker.random.number({ min: 1, max: 99999 }),
19 };
20 },
21 },
22 },
23 showPetById: {
24 mock: {
25 data: () => ({
26 id: faker.random.number({ min: 1, max: 99 }),
27 name: faker.name.firstName(),
28 tag: faker.helpers.randomize([faker.random.word(), undefined]),
29 }),
30 },
31 },
32 },
33 mock: {
34 properties: {
35 '/tag|name/': () => faker.name.lastName(),
36 },
37 },
38 },
39 },
40 input: {
41 target: './petstore.yaml',
42 override: {
43 transformer: 'src/add-version.js',
44 },
45 },
46 },
47 };