I use the Remix backend as a thin backend-for-frontend, while the "heavy lifting" (data access, business logic, etc...) I prefer to do in a .net core WebAPI project.
The WebAPI project generates an OpenAPI spec, which currently I am converting to a Typescript Client using a desktop tool, NSwag Studio. It isn't perfect, e.g. I need to manually change window to global every time I regenerate the client as it wasn't designed with polyfilled server-side fetch in mind.
My question: Is there a pain free way to implement automated client code generation into my Remix project? Not necessarily using NSwag as I'm sure there are superior Typescript client generators available. Ideally, I can just edit endpoints in my WebAPI project and have Remix (Vite???) rebuild the client code on the fly. Thanks