zoubingwu / msw-auto-mock

A cli tool to generate random mock data from OpenAPI definition for msw.
246 stars 54 forks source link

support output to a directory, each endpoint to an seperate file #40

Closed zoubingwu closed 2 days ago

zoubingwu commented 7 months ago

I would also like to add a way to let end user to write a function to tell how to generate data for each endpoint.

may be something like:

defineMockData('endpointOperationId', () => {
  return {
    fieldA: 'random1',
  }
})

and the result will be shallow merged.

zoubingwu commented 2 days ago

close this since: