-
Notifications
You must be signed in to change notification settings - Fork 669
Closed
Description
Several of my API methods result in a file download. How can I get Swashbuckle to download a file through the UI for these methods?
I've added an IOperationFilter with the following Apply method to add a "produces" attribute to certain methods:
public void Apply(Operation operation, SchemaRegistry schemaRegistry, ApiDescription apiDescription)
{
if (apiDescription.ID == "GETapi/Templates/{id}")
{
operation.produces.Add("application/octet-stream");
}
}
But when I execute this method through the Swashbuckle UI it displays the file contents in the "Response Body" textarea. Is there a way of getting a file to actually download?
Thanks
Metadata
Metadata
Assignees
Labels
No labels