private static void SetupSwaggerIntegration(IMMServiceBuilder builder, IMMSwashbuckleConfiguration config)
        {
            builder.AddMMServiceSetupAction(() =>
            {
                builder.Services.TryAddSingleton(config);
                builder.Services.AddSwaggerGen(c =>
                {
                    c.SwaggerDoc(config.MajorServiceVersionForUrl(), config.OpenApiInfo);
                    c.DocumentFilter <SwaggerSortByComplexityFilter>();

                    config.SwaggerGenSetupAction(c);
                });
            });
        }
示例#2
0
 public MMSwashbuckleConfigurationBuilder(IMMSwashbuckleConfiguration configuration)
 {
     _configuration = configuration;
 }
 public SwaggerSortByComplexityFilter(IMMSwashbuckleConfiguration configuration)
 {
     _configuration = configuration;
 }