Paul
Paul

Reputation: 12799

Add Swagger schema for a uploaded file on Net Core 3

I have an action like that:

public async Task<IActionResult> Process(IFormFile file)
{
}

My file is a Json (MyJsonClass). Would be possible to show MyJsonClass on Swagger ? How?

Thanks

Upvotes: 1

Views: 213

Answers (1)

Jakub Kozera
Jakub Kozera

Reputation: 3483

Here is a good post that explains your need solution, although it is not done with a .json file.

https://mattfrear.com/2015/04/21/generating-swagger-example-responses-with-swashbuckle/

Upvotes: 1

Related Questions