File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/TodoApp/OpenApi/AspNetCore Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ public static class AspNetCoreOpenApiEndpoints
1010{
1111 public static IServiceCollection AddAspNetCoreOpenApi ( this IServiceCollection services )
1212 {
13- services . AddSingleton < IOpenApiSchemaTransformer , AddSchemaDescriptionsTransformer > ( ) ;
1413 services . AddOpenApi ( options =>
1514 {
1615 // Add a document transformer to customise the generated OpenAPI document
@@ -57,7 +56,8 @@ public static IServiceCollection AddAspNetCoreOpenApi(this IServiceCollection se
5756 } ) ;
5857
5958 // Add a custom schema transformer to add descriptions from XML comments
60- options . AddSchemaTransformer < AddSchemaDescriptionsTransformer > ( ) ;
59+ var descriptions = new AddSchemaDescriptionsTransformer ( ) ;
60+ options . AddSchemaTransformer ( descriptions ) ;
6161
6262 // Add transformer to add examples to OpenAPI parameters, requests, responses and schemas
6363 var examples = new AddExamplesTransformer ( ) ;
You can’t perform that action at this time.
0 commit comments