We'd need to support custom string-based examples for Swagger UI. The UI has a known bug when providing it with string examples, see https://github.com/swagger-api/swagger-ui/issues/2369 for a reference. I'm not sure in which version it got fixed, but according to the last comment it's not an issue in 3.x.
Our code would like to do something like this in a custom IOperationFilter.
response.examples = new Dictionary<string, object>()
{
["application/json"] = "{ \"a\": 1 }",
["application/xml"] = "<root><a>1</a></root>",
};
Is there any way to upgrade the integrated swagger-ui to 3.x?
Thanks in advance for your reply.
Can you guys please upgrade to Swagger 3.x? Nobody uses ASP.NET Core!