Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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