< Summary - Jellyfin

Information
Class: Jellyfin.Api.Formatters.PascalCaseJsonProfileFormatter
Assembly: Jellyfin.Api
File(s): /srv/git/jellyfin/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 23
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor()100%11100%

File(s)

/srv/git/jellyfin/Jellyfin.Api/Formatters/PascalCaseJsonProfileFormatter.cs

#LineLine coverage
 1using System.Net.Mime;
 2using Jellyfin.Extensions.Json;
 3using Microsoft.AspNetCore.Mvc.Formatters;
 4using Microsoft.Net.Http.Headers;
 5
 6namespace Jellyfin.Api.Formatters;
 7
 8/// <summary>
 9/// Pascal Case Json Profile Formatter.
 10/// </summary>
 11public class PascalCaseJsonProfileFormatter : SystemTextJsonOutputFormatter
 12{
 13    /// <summary>
 14    /// Initializes a new instance of the <see cref="PascalCaseJsonProfileFormatter"/> class.
 15    /// </summary>
 2216    public PascalCaseJsonProfileFormatter() : base(JsonDefaults.PascalCaseOptions)
 17    {
 2218        SupportedMediaTypes.Clear();
 19        // Add application/json for default formatter
 2220        SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(MediaTypeNames.Application.Json));
 2221        SupportedMediaTypes.Add(MediaTypeHeaderValue.Parse(JsonDefaults.PascalCaseMediaType));
 2222    }
 23}

Methods/Properties

.ctor()