| | | 1 | | using ArturRios.Configuration.Enums; |
| | | 2 | | using Swashbuckle.AspNetCore.SwaggerGen; |
| | | 3 | | |
| | | 4 | | namespace ArturRios.Util.WebApi.Configuration; |
| | | 5 | | |
| | | 6 | | /// <summary>Options for <see cref="WebApplicationBuilderExtensions.AddWebApiSwagger"/>.</summary> |
| | | 7 | | public 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> |
| | 41 | 12 | | 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> |
| | 3 | 16 | | public bool JwtAuthentication { get; set; } |
| | | 17 | | |
| | | 18 | | /// <summary>Optional callback to further configure the Swagger generator (documents, filters, XML comments).</summa |
| | 3 | 19 | | public Action<SwaggerGenOptions>? ConfigureGenerator { get; set; } |
| | | 20 | | } |