Migrate Swashbuckle to built-in OpenAPI
ProprietaryMigrate from Swashbuckle to the built-in OpenAPI support in ASP.NET Core 10+. Replaces AddSwaggerGen() with AddOpenApi(), UseSwaggerUI() with MapOpenApi(), removes UseSwagger(), removes Swashbuckle packages, and adds Microsoft.AspNetCore.OpenApi. Only fires when every project targets net10.0+ (the version that ships Microsoft.OpenApi 2.x with its flattened type namespaces).
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. MigrateSwashbuckleToOpenApimod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. MigrateSwashbuckleToOpenApiInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.