|
|
|
|
|
by ljm
968 days ago
|
|
You can generate TS from an OpenAPI spec and then create type-safe mocks of network calls. Basic mocks and fake servers run the risk of falling out of sync and giving false positives, or just being outright wrong to short-cut some of the work. It's also less code to maintain when a service worker can intercept the call, instead of orchestrating a load of mock APIs. It won't stop you making breaking changes on the API but it will keep you honest on consuming the API on the client. |
|