< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.OpenApi.OaSchemaTypeExtensions
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/OpenApi/OaSchemaTypeExtensions.cs
Tag: Kestrun/Kestrun@5f1d2b981c9d7292c11fd448428c6ab6c811c5de
Line coverage
100%
Covered lines: 11
Uncovered lines: 0
Coverable lines: 11
Total lines: 29
Line coverage: 100%
Branch coverage
100%
Covered branches: 8
Total branches: 8
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 12/12/2025 - 17:27:19 Line coverage: 0% (0/11) Branch coverage: 0% (0/8) Total lines: 29 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd03/26/2026 - 03:54:59 Line coverage: 100% (11/11) Branch coverage: 100% (8/8) Total lines: 29 Tag: Kestrun/Kestrun@844b5179fb0492dc6b1182bae3ff65fa7365521d 12/12/2025 - 17:27:19 Line coverage: 0% (0/11) Branch coverage: 0% (0/8) Total lines: 29 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd03/26/2026 - 03:54:59 Line coverage: 100% (11/11) Branch coverage: 100% (8/8) Total lines: 29 Tag: Kestrun/Kestrun@844b5179fb0492dc6b1182bae3ff65fa7365521d

Coverage delta

Coverage delta 100 -100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToJsonSchemaType(...)100%88100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/OpenApi/OaSchemaTypeExtensions.cs

#LineLine coverage
 1using Microsoft.OpenApi;
 2
 3namespace Kestrun.OpenApi;
 4
 5/// <summary>
 6/// Extension methods for OaSchemaType enum.
 7/// </summary>
 8public static class OaSchemaTypeExtensions
 9{
 10    /// <summary>
 11    /// Converts OaSchemaType to JsonSchemaType.
 12    /// </summary>
 13    /// <param name="schemaType">The OaSchemaType value.</param>
 14    /// <returns>The corresponding JsonSchemaType value, or null if OaSchemaType.None.</returns>
 15    public static JsonSchemaType? ToJsonSchemaType(this OaSchemaType schemaType)
 16    {
 917        return schemaType switch
 918        {
 119            OaSchemaType.String => JsonSchemaType.String,
 120            OaSchemaType.Number => JsonSchemaType.Number,
 121            OaSchemaType.Integer => JsonSchemaType.Integer,
 122            OaSchemaType.Boolean => JsonSchemaType.Boolean,
 123            OaSchemaType.Array => JsonSchemaType.Array,
 124            OaSchemaType.Object => JsonSchemaType.Object,
 125            OaSchemaType.Null => JsonSchemaType.Null,
 226            _ => null,
 927        };
 28    }
 29}

Methods/Properties

ToJsonSchemaType(OaSchemaType)