Merge pull request #2848 from ZadenRB/startup-endpoint-parameters

Fix casing of JSON in Jellyfin API
This commit is contained in:
dkanada 2020-04-18 18:16:36 +09:00 committed by GitHub
commit 167e96d212
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -71,6 +71,11 @@ namespace Jellyfin.Server.Extensions
// Clear app parts to avoid other assemblies being picked up
.ConfigureApplicationPartManager(a => a.ApplicationParts.Clear())
.AddApplicationPart(typeof(StartupController).Assembly)
.AddJsonOptions(options =>
{
// Setting the naming policy to null leaves the property names as-is when serializing objects to JSON.
options.JsonSerializerOptions.PropertyNamingPolicy = null;
})
.AddControllersAsServices();
}