< Summary

Information
Class: ArturRios.Util.WebApi.Configuration.WebApiSwaggerOptions
Assembly: ArturRios.Util.WebApi
File(s): /home/runner/work/dotnet-webapi-util/dotnet-webapi-util/src/Configuration/WebApiSwaggerOptions.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 20
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 3
Fully covered methods: 3
Total methods: 3
Method coverage: 100%
Full method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_AllowedEnvironments()100%11100%
get_JwtAuthentication()100%11100%
get_ConfigureGenerator()100%11100%

File(s)

/home/runner/work/dotnet-webapi-util/dotnet-webapi-util/src/Configuration/WebApiSwaggerOptions.cs

#LineLine coverage
 1using ArturRios.Configuration.Enums;
 2using Swashbuckle.AspNetCore.SwaggerGen;
 3
 4namespace ArturRios.Util.WebApi.Configuration;
 5
 6/// <summary>Options for <see cref="WebApplicationBuilderExtensions.AddWebApiSwagger"/>.</summary>
 7public class WebApiSwaggerOptions
 8{
 9    /// <summary>The environments in which Swagger is generated and served. When empty, the
 10    /// <c>SwaggerEnvironments</c> argument decides, falling back to <c>Development</c> and <c>Local</c>
 11    /// (see <see cref="WebApiParameters.IsSwaggerAllowed"/>).</summary>
 4112    public EnvironmentType[] AllowedEnvironments { get; set; } = [];
 13
 14    /// <summary>Whether the generated document declares a JWT bearer security scheme, so Swagger UI offers an
 15    /// "Authorize" button. Defaults to <see langword="false"/>.</summary>
 316    public bool JwtAuthentication { get; set; }
 17
 18    /// <summary>Optional callback to further configure the Swagger generator (documents, filters, XML comments).</summa
 319    public Action<SwaggerGenOptions>? ConfigureGenerator { get; set; }
 20}