< 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@0d738bf294e6281b936d031e1979d928007495ff
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 29
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@826bf9dcf9db118c5de4c78a3259bce9549f0dcd

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 classes,
 3/// properties, or fields to contribute entries under components.requestBodies.
 4/// </summary>
 5[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = true, Inher
 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, emit an inline schema object instead of a $ref. If SchemaRef is provided and
 25    /// a matching schema exists in components, that schema will be embedded; otherwise the generator
 26    /// will try to infer an inline schema when possible.
 27    /// </summary>
 028    public bool Inline { get; set; }
 29}