You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When developing an application with CRUD features and an external API, we don't have the clearest way of mocking that communication before the API is ready.
Most of the time we would resort to manually creating mock data in our application and manually returning it in the repository layer after some delay.
This could be fine for GET requests, but the PUT, POST and DELETE would require additional logic just for making it work correctly.
Currently
When developing an application with CRUD features and an external API, we don't have the clearest way of mocking that communication before the API is ready.
Most of the time we would resort to manually creating mock data in our application and manually returning it in the repository layer after some delay.
This could be fine for GET requests, but the PUT, POST and DELETE would require additional logic just for making it work correctly.
Proposed
We could change this approach by using json server alongside mockaroo.
Json server would give us a fake REST API with full CRUD support and mockaroo would generate mock database data in the shape we define.
Also, we can create custom routes alongside these CRUD autogenerated ones for defining logic that is not a simple CRUD.
What do you think? Could this be of use to us?
The text was updated successfully, but these errors were encountered: