How can I specify the default Media Type for the Swagger in ASP.NET Core 3.1?
E.g. I have three choices of the Media Type. And I want the default to be application/json
, and not the text/plain
. How can I do that?
Add the attribute to your api controller:
[Produces("application/json")]