title: C# SwaggerGen + AutoRest - How to send a Stream body?
body: <p>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 <a href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore" rel="nofollow noreferrer">https://github.com/domaindrivendev/Swashbuckle.AspNetCore</a>). </p>
  
  <p>We call this api in code through a C# client we've generated using AutoRest (<a href="https://github.com/Azure/autorest" rel="nofollow noreferrer">https://github.com/Azure/autorest</a>).</p>
  
  <p>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.</p>
  
  <p>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?).</p>
  
  <p>Would appreciate any advice - But if we can't do this we can always use a HTTPClient manually, I guess.</p>