< Summary - Kestrun — Combined Coverage

Information
Class: OpenApiRequestBodyExampleRefAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiRequestBodyExampleRefAttribute.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/23/2025 - 19:23:04 Line coverage: 0% (0/4) Total lines: 24 Tag: Kestrun/Kestrun@d062f281460e6c123c372aef61f8d957bbb6c901

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/OpenApiRequestBodyExampleRefAttribute.cs

#LineLine coverage
 1/// <summary>
 2/// Declares a reusable example reference for a request body,
 3/// mapping a local example key to a components/examples reference.
 4/// </summary>
 5/// <remarks>
 6/// Create a request body example reference, optionally specifying the media type.
 7/// </remarks>
 8[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = true)]
 9public sealed class OpenApiRequestBodyExampleRefAttribute : KestrunAnnotation, IOpenApiExampleAttribute
 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}