Created
June 10, 2021 19:56
-
-
Save manoj-choudhari-git/025750f3c7f18555c8589086a880d7a3 to your computer and use it in GitHub Desktop.
.NET Core Web API - Add XML Serializer Formatters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers().AddXmlSerializerFormatters(); | |
services.AddSwaggerGen(c => | |
{ | |
c.SwaggerDoc("v1", new OpenApiInfo { Title = "WebApiFormatters", Version = "v1" }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment