From 32ee4e88ec05bf610150933974408fbe95ccd7bd Mon Sep 17 00:00:00 2001 From: Qiming Chen Date: Mon, 31 Jan 2022 11:21:56 -0800 Subject: [PATCH] fix: fix swagger api key auth (#4483) [no ci] --- src/Ombi/Extensions/StartupExtensions.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Ombi/Extensions/StartupExtensions.cs b/src/Ombi/Extensions/StartupExtensions.cs index e3253045a..296339dd0 100644 --- a/src/Ombi/Extensions/StartupExtensions.cs +++ b/src/Ombi/Extensions/StartupExtensions.cs @@ -41,6 +41,21 @@ namespace Ombi Type = SecuritySchemeType.ApiKey }); + c.AddSecurityRequirement(new OpenApiSecurityRequirement + { + { + new OpenApiSecurityScheme + { + Reference = new OpenApiReference + { + Type = ReferenceType.SecurityScheme, + Id = "ApiKey" + } + }, + new string[] {} + } + }); + c.CustomSchemaIds(x => x.FullName); try