< Summary - Kestrun — Combined Coverage

Information
Class: OpenApiResponseAttribute
Assembly: Kestrun.Annotations
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun.Annotations/OpenApi/Attributes/OpenApiResponseAttribute.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 49
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: 100% (7/7) Total lines: 47 Tag: Kestrun/Kestrun@826bf9dcf9db118c5de4c78a3259bce9549f0dcd01/09/2026 - 06:56:42 Line coverage: 0% (0/7) Total lines: 47 Tag: Kestrun/Kestrun@94f8107dc592fa7eaec45c0dd5f9fffbd41bc14501/12/2026 - 18:03:06 Line coverage: 0% (0/7) Total lines: 49 Tag: Kestrun/Kestrun@956332ccc921363590dccd99d5707fb20b50966b

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Key()100%210%
get_StatusCode()100%210%
get_Description()100%210%
get_Schema()100%210%
get_SchemaItem()100%210%
get_ContentType()100%210%
get_Inline()100%210%

File(s)

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

#LineLine coverage
 1
 2/// <summary>
 3/// Specifies metadata for an OpenAPI response object.
 4/// Can be attached to PowerShell or C# classes representing reusable responses.
 5/// </summary>
 6[AttributeUsage(AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true, Inhe
 7public sealed class OpenApiResponseAttribute : KestrunAnnotation, IOpenApiResponseAttribute
 8{
 9    /// <summary>
 10    /// Optional component name override for components.responses key.
 11    /// If omitted, the generator will name by member (Class.Property) when used on members,
 12    /// or by class name when applied at class-level.
 13    /// </summary>
 014    public string? Key { get; set; }
 15
 16    /// <summary>
 17    /// The HTTP status code (e.g., "200", "400", "404").
 18    /// </summary>
 019    public string StatusCode { get; set; } = "default";
 20
 21    /// <summary>
 22    /// A short description of the response (required in OpenAPI spec).
 23    /// </summary>
 024    public string? Description { get; set; }
 25
 26    /// <summary>
 27    /// Optional CLR type for the response schema.
 28    /// When set, this takes precedence over Schema and is
 29    /// mapped via InferPrimitiveSchema / PrimitiveSchemaMap.
 30    /// </summary>
 031    public Type? Schema { get; set; }
 32
 33    /// <summary>
 34    /// Optional CLR type for the response schema items when the response is an array.
 35    /// When set, this takes precedence over ItemSchema and is
 36    /// is mapped via InferPrimitiveSchema / PrimitiveSchemaMap.
 37    /// </summary>
 038    public Type? SchemaItem { get; set; }
 39
 40    /// <summary>
 41    /// MIME type of the response payload (default: "application/json").
 42    /// </summary>
 043    public string[] ContentType { get; set; } = ["application/json"];
 44
 45    /// <summary>
 46    /// If true, the schema will be inlined rather than referenced.
 47    /// </summary>
 048    public bool Inline { get; set; }
 49}