Skip to content

Instantly share code, notes, and snippets.

@justinyoo justinyoo/web-api-2-swagger-config.cs Secret
Last active Feb 22, 2016

Embed
What would you like to do?
ASP.NET Core Tips & Tricks
var config = new HttpConfiguration();
config.EnableSwagger(
c =>
{
c.SingleApiVersion("v1", "Swagger UI");
c.IgnoreObsoleteActions();
c.IgnoreObsoleteProperties();
c.IncludeXmlComments(GetXmlCommentsPath());
c.DescribeAllEnumsAsStrings();
c.UseFullTypeNameInSchemaIds();
})
.EnableSwaggerUi(
c =>
{
c.DocExpansion(DocExpansion.List);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.