I made a change to NSwag to apply the cancellationToken to the ReadAsStringAsync and ReadAsStreamAsync calls when the framework is .NET 5 or higher. My change should be available in the 14.5 version of NSwag, or the nightly build of master if you need it sooner.