How to extend the automatically generated web API client?

I am building a web API using .NET and consider automatically generating TypeScript and .NET clients using NSwag or similar. However, this would only generate the minimum basic standard for making HTTP requests and deserializing responses. In addition to this, you would need to cache and add calculated methods and properties to the response objects. How do I add my own functionality to these generated libraries without having to adjust each and every one of the methods of my own class?