aboutsummaryrefslogtreecommitdiff
path: root/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2020-04-25 11:09:38 +0200
committerGitHub <noreply@github.com>2020-04-25 11:09:38 +0200
commit383bc453728684bca187e826ff099493175ba312 (patch)
treea6da02b3978e1ef13d6aeb04b56d9dc64e1195de /Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
parenta2f19eadf739297cbbc99c9082b0175e8b881054 (diff)
parent0765ef8bda4d23e33fde7a1bfe49b5a365c6d28e (diff)
Merge pull request #2932 from crobibero/api-casing
Add optional camelCase formatter
Diffstat (limited to 'Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs')
-rw-r--r--Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
index 71ef9a69a..00688074f 100644
--- a/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
+++ b/Jellyfin.Server/Extensions/ApiServiceCollectionExtensions.cs
@@ -4,6 +4,7 @@ using Jellyfin.Api.Auth.FirstTimeSetupOrElevatedPolicy;
using Jellyfin.Api.Auth.RequiresElevationPolicy;
using Jellyfin.Api.Constants;
using Jellyfin.Api.Controllers;
+using Jellyfin.Server.Formatters;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authorization;
using Microsoft.Extensions.DependencyInjection;
@@ -66,6 +67,8 @@ namespace Jellyfin.Server.Extensions
return serviceCollection.AddMvc(opts =>
{
opts.UseGeneralRoutePrefix(baseUrl);
+ opts.OutputFormatters.Insert(0, new CamelCaseJsonProfileFormatter());
+ opts.OutputFormatters.Insert(0, new PascalCaseJsonProfileFormatter());
})
// Clear app parts to avoid other assemblies being picked up