< 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@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 24
Line coverage: 0%
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@826bf9dcf9db118c5de4c78a3259bce9549f0dcd01/17/2026 - 04:33:35 Line coverage: 0% (0/4) Total lines: 24 Tag: Kestrun/Kestrun@aca34ea8d284564e2f9f6616dc937668dce926ba

Metrics

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

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>
 012    public required string Key { get; set; }
 13
 14    /// <summary>Id under #/components/examples/{ReferenceId}</summary>
 015    public required string ReferenceId { get; set; }
 16
 17    /// <summary>Media type bucket (e.g., application/json, application/xml)</summary>
 018    public string[]? ContentType { get; set; }
 19
 20    /// <summary>
 21    /// When true, embeds the example directly instead of referencing it.
 22    /// </summary>
 023    public bool Inline { get; set; }
 24}