zoubingwu / msw-auto-mock

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

Get static data #32

Closed ArthurGoupil closed 7 months ago

ArthurGoupil commented 1 year ago

Hello !

Thanks for this beautiful lib!

I've started using it for our mocks generation but I'm facing an issue. We're using our mocks to run some visual regression tests, so with Faker it changes each times.

Is there a way to avoid this? I guess I should propose a PR for an new option?

Thanks in advance, Arthur

zoubingwu commented 1 year ago

for now, if your swagger have example data, this tool will use that instead of using faker, https://swagger.io/docs/specification/adding-examples/

zoubingwu commented 7 months ago

this is done in https://github.com/zoubingwu/msw-auto-mock/pull/43 and release in 0.17.0