I using swashbuckle v 5.6.0 for api documentation and ui for test in asp.net web api2.
I do not want give ability for the user to post data from swagger ui in production.
How do I disable it?
GlobalConfiguration.Configuration
.EnableSwagger(c =>
{
c.Schemes(new[] { "http", "https" });
c.SingleApiVersion("v1", "Demo API");
c.PrettyPrint();
c.IncludeXmlComments(GetXmlCommentsPath());
})
.EnableSwaggerUi(c =>
{
c.DisableValidator();
});