sharkio-dev / sharkio

Sharkio is an API proxy for your development environments. It records all the requests that are sent to your API. It allows you to replay the requests easily. Generate types, documentation, test suites, And interact with your API using AI.
https://sharkio.dev/
MIT License
5 stars 1 forks source link

Turn on/off mock at sniffer level #359

Open sharkiodev opened 8 months ago

sharkiodev commented 8 months ago

Please add an additional field to the sniffer object. isMockingEnabled

And add an additional check-in find mock function in mock middleware: If mocks are disabled don't return the mock https://github.com/sharkio-dev/sharkio/blob/c5831b97968d472b13559a7abe6c87ca6681a6d7/server/server/middlewares/mock.middleware.ts#L25-L43

Also in the UI add it in the sniffer card a toggle button with disable mock:

Screenshot 2024-01-01 at 13 58 41