I imagine this is a pretty typical scenario: Our solution exposes an API constructed from asp core C# controllers, from which we generate a swagger.json (Using https://github.com/domaindrivendev/Swashbuckle.AspNetCore).
We call this api in code through a C# client we've generated using AutoRest (https://github.com/Azure/autorest).
To perform a potentially large upload, we'd like to use our AutoRest generated client to pass a Stream from a C# caller to our back-end, to avoid having to serialise / deserialise a complete object.
I can't work out how I might use the two tools together to pass a Stream in with a call from our c# code. I've tried adding it as a parameter, but this results in AutoRest creating a "Stream" model for System.IO.Stream, which is then used as the type of the input parameter instead of it just keeping the original type. I've tried passing it in as a [FromBody] parameter, but in addition to the issue above, AutoRest then also types it as StringContent before adding it to the request instead StreamContent (Likely because SwaggerGen doesn't identify it as a Stream?).
Would appreciate any advice - But if we can't do this we can always use a HTTPClient manually, I guess.