Skip to content

Commit 7558e76

Browse files
author
Dominik Oswald
committed
Add full swagger OpenApiInfo
1 parent 8fbc1a5 commit 7558e76

File tree

1 file changed

+18
-1
lines changed
  • aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/Startup

1 file changed

+18
-1
lines changed

aspnet-core/src/AbpCompanyName.AbpProjectName.Web.Host/Startup/Startup.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,24 @@ public IServiceProvider ConfigureServices(IServiceCollection services)
7676
// Swagger - Enable this line and the related lines in Configure method to enable swagger UI
7777
services.AddSwaggerGen(options =>
7878
{
79-
options.SwaggerDoc("v1", new OpenApiInfo() { Title = "AbpProjectName API", Version = "v1" });
79+
options.SwaggerDoc("v1", new OpenApiInfo
80+
{
81+
Version = "v1",
82+
Title = "AbpProjectName API",
83+
Description = "AbpProjectName",
84+
// uncomment if needed TermsOfService = new Uri("https://example.com/terms"),
85+
Contact = new OpenApiContact
86+
{
87+
Name = "AbpProjectName",
88+
Email = string.Empty,
89+
Url = new Uri("https://twitter.com/aspboilerplate"),
90+
},
91+
License = new OpenApiLicense
92+
{
93+
Name = "MIT License",
94+
Url = new Uri("https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/LICENSE"),
95+
}
96+
});
8097
options.DocInclusionPredicate((docName, description) => true);
8198

8299
// Define the BearerAuth scheme that's in use

0 commit comments

Comments
 (0)