< Summary - Kestrun — Combined Coverage

Information
Class: OpenApiRequestBodyAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiRequestBodyAttribute.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 30
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: 0% (0/5) Total lines: 29 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd01/12/2026 - 18:03:06 Line coverage: 0% (0/5) Total lines: 30 Tag: Kestrun/Kestrun@956332ccc921363590dccd99d5707fb20b50966b

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Description()100%210%
get_ContentType()100%210%
get_Required()100%210%
get_Example()100%210%
get_Inline()100%210%

File(s)

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

#LineLine coverage
 1/// <summary>
 2/// Specifies metadata for an OpenAPI Request Body component. Can be applied to parameters
 3/// to contribute entries under components.requestBodies.
 4/// </summary>
 5[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
 6public sealed class OpenApiRequestBodyAttribute : KestrunAnnotation
 7{
 8    /// <summary>Description for the request body.</summary>
 09    public string? Description { get; set; }
 10
 11    /// <summary>Media type. Defaults to application/json.</summary>
 012    public string[] ContentType { get; set; } = ["application/json"];
 13
 14    /// <summary>Whether the request body is required.</summary>
 015    public bool Required { get; set; }
 16
 17    /// <summary>
 18    /// Inline example object for the media type (optional). If omitted and the member has a
 19    /// default value, the generator will use that default as the example.
 20    /// </summary>
 021    public object? Example { get; set; }
 22
 23    /// <summary>
 24    /// When true, the generator will emit an inline schema object for the request body instead
 25    /// of a <c>$ref</c> to <c>components.schemas</c>. This applies whether the schema is resolved
 26    /// from a CLR type or from a string-based schema reference; in both cases the resolved schema
 27    /// will be inlined where supported.
 28    /// </summary>
 029    public bool Inline { get; set; }
 30}