Another approach would be to generate TypeScript types based off of OpenAPI definitions - we use oats (https://github.com/smartlyio/oats), but I am pretty sure there are other libraries that achieve the same thing. One downside is that you need some mechanism to keep the OpenAPI definitions in sync, but eg GitHub actions could easily do the job. Upside of oats is that it generates the endpoints for you so you dont need to eg setup a server in your tests.