< Summary - Kestrun — Combined Coverage

Information
Class: OpenApiExampleRefAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiExampleRefAttribute.cs
Tag: Kestrun/Kestrun@0d738bf294e6281b936d031e1979d928007495ff
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 24
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 12/12/2025 - 17:27:19 Line coverage: 100% (4/4) Total lines: 24 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Key()100%11100%
get_ReferenceId()100%11100%
get_ContentType()100%11100%
get_Inline()100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiExampleRefAttribute.cs

#LineLine coverage
 1/// <summary>
 2/// Declares a reusable example on a specific media type of a response,
 3/// mapping a local example key to a components/examples reference.
 4/// </summary>
 5/// <remarks>
 6/// Create an example reference specifying the media type.
 7/// </remarks>
 8[AttributeUsage(AttributeTargets.Class | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
 9public sealed class OpenApiExampleRefAttribute : KestrunAnnotation
 10{
 11    /// <summary>Local name under content[contentType].examples</summary>
 1312    public required string Key { get; set; }
 13
 14    /// <summary>Id under #/components/examples/{ReferenceId}</summary>
 1215    public required string ReferenceId { get; set; }
 16
 17    /// <summary>Media type bucket (e.g., application/json, application/xml)</summary>
 1418    public string? ContentType { get; set; }
 19
 20    /// <summary>
 21    /// When true, embeds the example directly instead of referencing it.
 22    /// </summary>
 1023    public bool Inline { get; set; }
 24}