Skip to content

Commit 335c4ec

Browse files
author
Sergey Tregub
committed
Remove unnecessary comments and add a link to the doc
1 parent 221a194 commit 335c4ec

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

ProjectTemplates/ReferenceProject/Startup.cs

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -75,22 +75,6 @@ public void ConfigureServices(IServiceCollection services)
7575
options.Filters.Add(new CacheControlFilter()); // Add "Cache-Control" header. See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#cache-control
7676
})
7777
.AddApiExplorer()
78-
/*
79-
* TODO: Must be removed
80-
* This code is obsolete now: https://docs.microsoft.com/en-us/dotnet/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to#differences-in-default-jsonserializer-behavior-compared-to-newtonsoftjson
81-
.AddJsonFormatters() // See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#content-formatting
82-
.AddJsonOptions(options =>
83-
{
84-
options.SerializerSettings.NullValueHandling = NullValueHandling.Ignore;
85-
options.SerializerSettings.DefaultValueHandling = DefaultValueHandling.Include;
86-
options.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
87-
options.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
88-
#if DEBUG
89-
options.SerializerSettings.Formatting = Formatting.Indented;
90-
#else
91-
options.SerializerSettings.Formatting = Formatting.None;
92-
#endif
93-
})*/
9478
.SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
9579

9680
services
@@ -162,7 +146,7 @@ public void Configure(IApplicationBuilder app, ILogger<Startup> logger)
162146
app.UseEndpoints(endpoints =>
163147
{
164148
endpoints.MapDefaultControllerRoute();
165-
endpoints.MapHealthChecks(Constants.Health.EndPoint); // TODO: Must be documented: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks?view=aspnetcore-3.1
149+
endpoints.MapHealthChecks(Constants.Health.EndPoint); // See: https://github.com/drwatson1/AspNet-Core-REST-Service/wiki#health-checks
166150
});
167151

168152
logger.LogInformation("Server configuration is completed");

0 commit comments

Comments
 (0)