How to force Swagger/Swashbuckle to append an API key?
问题 I have a .NET Core 2.x project which integrates Swagger and Swashbuckle v4.x. And it all works really well. However, now I need to append a query string to every GET that is fired by Swagger in the form of www.foo.com/myendpoint? authorization=APIKEY . To that end, I have the following in Startup.ConfigureServices: services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "My API", Version = "v1" }); c.AddSecurityDefinition("api key", new ApiKeyScheme() { Description =