< Summary - Kestrun — Combined Coverage

Information
Class: OpenApiXmlAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiXmlAttribute.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
100%
Covered lines: 5
Uncovered lines: 0
Coverable lines: 5
Total lines: 44
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 01/21/2026 - 17:07:46 Line coverage: 100% (5/5) Total lines: 44 Tag: Kestrun/Kestrun@3f6f61710c7ef7d5953cab578fe699c1e5e01a36

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%11100%
get_Namespace()100%11100%
get_Prefix()100%11100%
get_Attribute()100%11100%
get_Wrapped()100%11100%

File(s)

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

#LineLine coverage
 1/// <summary>
 2/// OpenAPI XML metadata for properties and classes.
 3/// Use this attribute to configure XML-specific serialization details in OpenAPI 3.2+.
 4/// Apply to:
 5/// <list type="bullet">
 6/// <item><description>Class (object-level): set XML name, namespace, and prefix for the entire schema.</description></i
 7/// <item><description>Property (member-level): set XML name, whether it's an attribute, wrapping behavior, etc.</descri
 8/// </list>
 9/// </summary>
 10[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inhe
 11public sealed class OpenApiXmlAttribute : KestrunAnnotation
 12{
 13    /// <summary>
 14    /// Replaces the name of the element/attribute used for the described schema property.
 15    /// When applied to arrays, applies to the individual items (not the array wrapper).
 16    /// </summary>
 2817    public string? Name { get; set; }
 18
 19    /// <summary>
 20    /// The absolute URI of the namespace definition.
 21    /// Example: "http://example.com/schema/v1"
 22    /// </summary>
 2223    public string? Namespace { get; set; }
 24
 25    /// <summary>
 26    /// A prefix for the name (used with namespace).
 27    /// Example: "sample" would result in "sample:elementName"
 28    /// </summary>
 2029    public string? Prefix { get; set; }
 30
 31    /// <summary>
 32    /// Declares whether the property is rendered as an XML attribute instead of an element.
 33    /// Only applies to properties, not to arrays or complex types.
 34    /// Default: false (rendered as element).
 35    /// </summary>
 2036    public bool Attribute { get; set; }
 37
 38    /// <summary>
 39    /// Indicates whether array items should be wrapped in an enclosing element.
 40    /// Only applies to array properties.
 41    /// Default: false (unwrapped).
 42    /// </summary>
 2043    public bool Wrapped { get; set; }
 44}