Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Created October 8, 2021 20:49
Show Gist options
  • Save ankitvijay/a96065d32a15b1374d70d094fc6b2d84 to your computer and use it in GitHub Desktop.
Save ankitvijay/a96065d32a15b1374d70d094fc6b2d84 to your computer and use it in GitHub Desktop.
NServiceBus Cosmos Sample - Use Swagger
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "Posts Api", Version = "v1" });
});
var app = builder.Build();
.
.
app.UseHttpsRedirection()
.UseStaticFiles()
.UseSwagger()
.UseSwaggerUI(options => { options.SwaggerEndpoint("v1/swagger.json", "Posts Api"); })
.UseRouting();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment