< Summary - Kestrun — Combined Coverage

Information
Class: OpenApiResponseExampleRefAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiResponseExampleRefAttribute.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
80%
Covered lines: 4
Uncovered lines: 1
Coverable lines: 5
Total lines: 28
Line coverage: 80%
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/23/2025 - 19:23:04 Line coverage: 0% (0/5) Total lines: 28 Tag: Kestrun/Kestrun@d062f281460e6c123c372aef61f8d957bbb6c90101/09/2026 - 06:56:42 Line coverage: 80% (4/5) Total lines: 28 Tag: Kestrun/Kestrun@94f8107dc592fa7eaec45c0dd5f9fffbd41bc145

Metrics

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

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiResponseExampleRefAttribute.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.Method, AllowMultiple = true, Inherited = false)]
 9public sealed class OpenApiResponseExampleRefAttribute : KestrunAnnotation, IOpenApiResponseAttribute, IOpenApiExampleAt
 10{
 11    /// <summary>
 12    /// The HTTP status code for the response.
 13    /// </summary>
 414    public string StatusCode { get; set; } = "default";
 15    /// <summary>Local name under content[contentType].examples</summary>
 616    public required string Key { get; set; }
 17
 18    /// <summary>Id under #/components/examples/{ReferenceId}</summary>
 1319    public required string ReferenceId { get; set; }
 20
 21    /// <summary>Media type bucket (e.g., application/json, application/xml)</summary>
 022    public string[]? ContentType { get; set; }
 23
 24    /// <summary>
 25    /// When true, embeds the example directly instead of referencing it.
 26    /// </summary>
 727    public bool Inline { get; set; }
 28}