What is the right 'type' parameter for SwaggerResponse attribute in case of FileStreamResult
I am having a function which returns FileStreamResult.
When I set Type parameter as 'Stream' in SwaggerResponse I am getting exception while using the client package method.
Error Message :
"Could not deserialize the response body stream as ProjectName.Client.Stream.\n\nStatus: 200\nResponse: \n"
How to resolve this?
[HttpGet]
[SwaggerOperation(
OperationId = nameof(DownloadFileAsync), Produces = new[] { "application/yaml", "application/zip" }, Tags = new[] { "" })]
[SwaggerResponse(StatusCodes.Status200OK, nameof(StatusCodes.Status200OK), typeof(Stream))]
public async Task<IActionResult> DownloadFileAsync()
{
// some code here
return File(memoryStream, "application/zip", "fileName.zip");
}