Skip to content

Instantly share code, notes, and snippets.

@mdcarmo mdcarmo/configSwagger.cs
Last active Mar 21, 2018

Embed
What would you like to do?
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
c.InjectStylesheet("/swagger-ui/custom.css");
c.InjectOnCompleteJavaScript("/swagger-ui/custom.js");
});
app.Run(context => {
context.Response.Redirect("/swagger");
return Task.CompletedTask;
});
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.