File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/Workleap.Extensions.OpenAPI/Builder Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 33using Microsoft . AspNetCore . Hosting ;
44using Microsoft . Extensions . DependencyInjection ;
55using Microsoft . Extensions . Options ;
6+ using Swashbuckle . AspNetCore . SwaggerGen ;
67using Swashbuckle . AspNetCore . SwaggerUI ;
78using Workleap . Extensions . OpenAPI . OperationId ;
89using Workleap . Extensions . OpenAPI . Ordering ;
@@ -28,8 +29,14 @@ internal OpenApiBuilder(IServiceCollection services)
2829 options . SupportNonNullableReferenceTypes ( ) ;
2930 options . OperationFilter < ExtractSchemaTypeResultFilter > ( ) ;
3031 options . SchemaFilter < ExtractRequiredAttributeFromNullableType > ( ) ;
32+ } ) ;
33+
34+ // Use PostConfigure to ensure ordering happens after all other filters
35+ this . _services . PostConfigure < SwaggerGenOptions > ( options =>
36+ {
3137 options . DocumentFilter < OrderResponseFilter > ( ) ;
3238 } ) ;
39+
3340 this . _services . AddSingleton < IStartupFilter , JsonOptionsFilter > ( ) ;
3441 }
3542
You can’t perform that action at this time.
0 commit comments