Skip to content

Instantly share code, notes, and snippets.

@mdcarmo
Last active March 21, 2018 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mdcarmo/791d159e8d51692cdbde21e31243ac8e to your computer and use it in GitHub Desktop.
Save mdcarmo/791d159e8d51692cdbde21e31243ac8e to your computer and use it in GitHub Desktop.
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