diff --git a/Endpoint/Configuration/SwaggerOptions/ConfigureSwaggerOptions.cs b/Endpoint/Configuration/SwaggerOptions/ConfigureSwaggerOptions.cs index eae4d2e..2de861c 100644 --- a/Endpoint/Configuration/SwaggerOptions/ConfigureSwaggerOptions.cs +++ b/Endpoint/Configuration/SwaggerOptions/ConfigureSwaggerOptions.cs @@ -12,9 +12,7 @@ public class ConfigureSwaggerOptions(IApiVersionDescriptionProvider provider) : public void Configure(SwaggerGenOptions options) { foreach (var description in provider.ApiVersionDescriptions) - { options.SwaggerDoc(description.GroupName, CreateInfoForApiVersion(description)); - } } private static OpenApiInfo CreateInfoForApiVersion(ApiVersionDescription description) diff --git a/Endpoint/Configuration/SwaggerOptions/SwaggerDefaultValues.cs b/Endpoint/Configuration/SwaggerOptions/SwaggerDefaultValues.cs index 290f981..a6b9dd4 100644 --- a/Endpoint/Configuration/SwaggerOptions/SwaggerDefaultValues.cs +++ b/Endpoint/Configuration/SwaggerOptions/SwaggerDefaultValues.cs @@ -23,16 +23,12 @@ public class SwaggerDefaultValues : IOperationFilter foreach (var contentType in response.Content.Keys) { if (responseType.ApiResponseFormats.All(x => x.MediaType != contentType)) - { response.Content.Remove(contentType); - } } } if (operation.Parameters == null) - { return; - } foreach (var parameter in operation.Parameters) {