This commit is contained in:
2023-02-22 17:06:27 +01:00
parent 49079d0534
commit f595773d33
3 changed files with 19 additions and 3 deletions

View File

@@ -35,8 +35,12 @@ Public Class SwaggerConfig
' scopes.Add("read", "Read access to protected resources")
' scopes.Add("write", "Write access to protected resources")
' End Function)
c.BasicAuth("basic").Description("Basic HTTP Authentication")
'c.BasicAuth("basic").Description("Basic HTTP Authentication")
'c.ApiKey("apiKey").Description("API Key Authentication").Name("apiKey").In("header")
c.OperationFilter(Of AddAuthorizationHeaderParameterOperationFilter)()
'c.OperationFilter(Of AddAuthTokenHeaderParameter)()
'c.IncludeXmlComments($"{AppDomain.CurrentDomain.BaseDirectory}\bin\MyApi.XML")
@@ -46,6 +50,7 @@ Public Class SwaggerConfig
c.DocumentTitle(descr)
c.EnableDiscoveryUrlSelector()
c.DocExpansion(DocExpansion.Full)
c.EnableApiKeySupport("apiKey", "header")
'c.EnableOAuth2Support(clientId:="test-client-id", clientSecret:=Nothing, realm:="test-realm", appName:="Swagger UI", additionalQueryStringParams:=New Dictionary(Of String, String)() From {
' {"foo", "bar"}