From 2684de0fffd3beff1c4a866a83a42d48caa1104c Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 7 Mar 2019 14:06:02 -0500 Subject: [PATCH] add more metadata to swaggergen --- .../Utilities/ServiceCollectionExtensions.cs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/Api/Utilities/ServiceCollectionExtensions.cs b/src/Api/Utilities/ServiceCollectionExtensions.cs index 2bd2bcbef..2deb1c35f 100644 --- a/src/Api/Utilities/ServiceCollectionExtensions.cs +++ b/src/Api/Utilities/ServiceCollectionExtensions.cs @@ -12,7 +12,23 @@ namespace Bit.Api.Utilities { services.AddSwaggerGen(config => { - config.SwaggerDoc("public", new Info { Title = "Bitwarden Public API", Version = "latest" }); + config.SwaggerDoc("public", new Info + { + Title = "Bitwarden Public API", + Version = "latest", + Contact = new Contact + { + Name = "Bitwarden Support", + Url = "https://bitwarden.com", + Email = "support@bitwarden.com" + }, + Description = "The Bitwarden public APIs.", + License = new License + { + Name = "GNU Affero General Public License v3.0", + Url = "https://github.com/bitwarden/server/blob/master/LICENSE.txt" + } + }); // config.SwaggerDoc("internal", new Info { Title = "Bitwarden Internal API", Version = "latest" }); config.AddSecurityDefinition("OAuth2 Client Credentials", new OAuth2Scheme