I try to download a file via an angular 2 typescript client. The link generated in Swagger UI works fine, but the generated typescript client does not.
The controller lo
Found the response of this problem :
In startup add :
services.AddSwaggerGen(options =>
{
options.MapType(() => new Schema
{
Type = "file",
});
}
And for your controller :
[HttpPost()]
[SwaggerResponse(200, typeof(FileContentResult))]
[ProducesResponseType(typeof(FileContentResult), 200)]
public async Task MyMethod(Viewmodel vm)
{
A late response but for people who has the same problem ...