Class SwaggerGenOptionsExtensions
- Assembly
- Codebelt.Extensions.Swashbuckle.AspNetCore.dll
Extension methods for the Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions class.
public static class SwaggerGenOptionsExtensions
- Inheritance
-
SwaggerGenOptionsExtensions
Methods
AddBasicAuthenticationSecurity(SwaggerGenOptions)
Adds support for AuthN/AuthZ using the Basic security scheme.
public static SwaggerGenOptions AddBasicAuthenticationSecurity(this SwaggerGenOptions options)
Parameters
options
SwaggerGenOptionsThe Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions to extend.
Returns
- SwaggerGenOptions
A reference to
options
so that additional calls can be chained.
AddJwtBearerSecurity(SwaggerGenOptions)
Adds support for AuthN/AuthZ using the Bearer security scheme in JWT format.
public static SwaggerGenOptions AddJwtBearerSecurity(this SwaggerGenOptions options)
Parameters
options
SwaggerGenOptionsThe Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions to extend.
Returns
- SwaggerGenOptions
A reference to
options
so that additional calls can be chained.
AddUserAgent(SwaggerGenOptions, Action<UserAgentDocumentOptions>)
Adds an UserAgentDocumentFilter to the Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions.DocumentFilterDescriptors.
public static SwaggerGenOptions AddUserAgent(this SwaggerGenOptions options, Action<UserAgentDocumentOptions> setup = null)
Parameters
options
SwaggerGenOptionsThe Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions to extend.
setup
Action<UserAgentDocumentOptions>The UserAgentDocumentOptions that may be configured.
Returns
- SwaggerGenOptions
A reference to
options
so that additional calls can be chained.
AddXApiKeySecurity(SwaggerGenOptions)
Adds support for first line of defense using security based HTTP X-Api-Key header.
public static SwaggerGenOptions AddXApiKeySecurity(this SwaggerGenOptions options)
Parameters
options
SwaggerGenOptionsThe Swashbuckle.AspNetCore.SwaggerGen.SwaggerGenOptions to extend.
Returns
- SwaggerGenOptions
A reference to
options
so that additional calls can be chained.