Created
October 8, 2021 20:49
-
-
Save ankitvijay/a96065d32a15b1374d70d094fc6b2d84 to your computer and use it in GitHub Desktop.
NServiceBus Cosmos Sample - Use Swagger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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