| | 1 | | using Microsoft.Extensions.DependencyInjection; |
| | 2 | | using Plainquire.Page.Swashbuckle.Filters; |
| | 3 | | using Swashbuckle.AspNetCore.SwaggerGen; |
| | 4 | | using System.Diagnostics.CodeAnalysis; |
| | 5 | |
|
| | 6 | | namespace Plainquire.Page.Swashbuckle; |
| | 7 | |
|
| | 8 | | /// <summary> |
| | 9 | | /// Extensions to register entity filter extensions to Swashbuckle.AspNetCore (https://github.com/domaindrivendev/Swashb |
| | 10 | | /// </summary> |
| | 11 | | /// <autogeneratedoc /> |
| | 12 | | [SuppressMessage("ReSharper", "UnusedMethodReturnValue.Global", Justification = "Provided as library, can be used from o |
| | 13 | | public static class SwaggerGenOptionsExtensions |
| | 14 | | { |
| | 15 | | /// <summary> |
| | 16 | | /// Replaces action parameters of type <see cref="EntityPage{TEntity}"/> with filterable properties of type <c>TEnti |
| | 17 | | /// </summary> |
| | 18 | | /// <param name="options">The options.</param> |
| | 19 | | /// <param name="xmlDocumentationFilePaths">Paths to XML documentation files. Used to provide parameter descriptions |
| | 20 | | public static SwaggerGenOptions AddPageSupport(this SwaggerGenOptions options, params string[] xmlDocumentationFileP |
| | 21 | | { |
| 5 | 22 | | options.OperationFilter<EntityPageParameterReplacer>(); |
| 5 | 23 | | return options; |
| | 24 | | } |
| | 25 | | } |