< 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@0d738bf294e6281b936d031e1979d928007495ff
Line coverage
0%
Covered lines: 0
Uncovered lines: 11
Coverable lines: 11
Total lines: 29
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 8
Branch coverage: 0%
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@826bf9dcf9db118c5de4c78a3259bce9549f0dcd 12/12/2025 - 17:27:19 Line coverage: 0% (0/11) Branch coverage: 0% (0/8) Total lines: 29 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ToJsonSchemaType(...)0%7280%

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    {
 017        return schemaType switch
 018        {
 019            OaSchemaType.String => JsonSchemaType.String,
 020            OaSchemaType.Number => JsonSchemaType.Number,
 021            OaSchemaType.Integer => JsonSchemaType.Integer,
 022            OaSchemaType.Boolean => JsonSchemaType.Boolean,
 023            OaSchemaType.Array => JsonSchemaType.Array,
 024            OaSchemaType.Object => JsonSchemaType.Object,
 025            OaSchemaType.Null => JsonSchemaType.Null,
 026            _ => null,
 027        };
 28    }
 29}

Methods/Properties

ToJsonSchemaType(OaSchemaType)