< Summary - Kestrun — Combined Coverage

Information
Class: Kestrun.Hosting.Options.SseBroadcastOptions
Assembly: Kestrun
File(s): /home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Hosting/Options/SseBroadcastOptions.cs
Tag: Kestrun/Kestrun@ca54e35c77799b76774b3805b6f075cdbc0c5fbe
Line coverage
85%
Covered lines: 12
Uncovered lines: 2
Coverable lines: 14
Total lines: 112
Line coverage: 85.7%
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/12/2026 - 18:03:06 Line coverage: 85.7% (12/14) Total lines: 112 Tag: Kestrun/Kestrun@956332ccc921363590dccd99d5707fb20b50966b

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Default()100%210%
get_Path()100%11100%
get_KeepAliveSeconds()100%11100%
get_DocId()100%11100%
get_OperationId()100%11100%
get_Summary()100%11100%
get_Description()100%11100%
get_Tags()100%11100%
get_StatusCode()100%11100%
get_ResponseDescription()100%11100%
get_ContentType()100%11100%
get_ItemSchemaType()100%11100%
get_ItemSchemaFormat()100%210%
get_SkipOpenApi()100%11100%

File(s)

/home/runner/work/Kestrun/Kestrun/src/CSharp/Kestrun/Hosting/Options/SseBroadcastOptions.cs

#LineLine coverage
 1namespace Kestrun.Hosting.Options;
 2
 3/// <summary>
 4/// Customization options for the OpenAPI metadata generated for the SSE broadcast endpoint.
 5/// </summary>
 6public sealed record SseBroadcastOptions
 7{
 8    /// <summary>
 9    /// The default path for the SSE broadcast endpoint.
 10    /// </summary>
 11    public const string DefaultPath = "/sse/broadcast";
 12
 13    /// <summary>
 14    /// The default description for the SSE broadcast endpoint.
 15    /// </summary>
 16    public const string DefaultDescription = "Opens a Server-Sent Events (text/event-stream) connection that receives se
 17
 18    /// <summary>
 19    /// The default tag for the SSE broadcast endpoint.
 20    /// </summary>
 21    public const string DefaultTag = "SSE";
 22
 23    /// <summary>
 24    /// The default operationId for the SSE broadcast endpoint.
 25    /// </summary>
 26    public const string DefaultOperationId = "GetSseBroadcast";
 27
 28    /// <summary>
 29    /// The default response description for the SSE broadcast endpoint.
 30    /// </summary>
 31    public const string DefaultResponseDescription = "SSE stream (text/event-stream)";
 32
 33    /// <summary>
 34    /// The default summary for the SSE broadcast endpoint.
 35    /// </summary>
 36    public const string DefaultSummary = "Broadcast SSE stream";
 37
 38    /// <summary>
 39    /// The default keep-alive interval in seconds for the SSE connection.
 40    /// </summary>
 41    public const int DefaultKeepAliveSeconds = 15;
 42
 43    /// <summary>
 44    /// Gets a default configuration for the SSE broadcast OpenAPI metadata.
 45    /// </summary>
 046    public static SseBroadcastOptions Default { get; } = new();
 47
 48    /// <summary>
 49    /// The path for the SSE broadcast endpoint.
 50    /// </summary>
 1251    public string Path { get; init; } = DefaultPath;
 52
 53    /// <summary>
 54    /// The path for the SSE broadcast endpoint.
 55    /// </summary>
 456    public int KeepAliveSeconds { get; init; } = DefaultKeepAliveSeconds;
 57
 58    /// <summary>
 59    /// Customization options for the OpenAPI metadata generated for the SSE broadcast endpoint.
 60    /// </summary>
 461    public string[] DocId { get; set; } = OpenApi.OpenApiDocDescriptor.DefaultDocumentationIds;
 62
 63    /// <summary>
 64    /// OpenAPI operationId for the endpoint.
 65    /// </summary>
 766    public string? OperationId { get; init; } = DefaultOperationId;
 67
 68    /// <summary>
 69    /// OpenAPI summary for the endpoint.
 70    /// </summary>
 771    public string? Summary { get; init; } = DefaultSummary;
 72
 73    /// <summary>
 74    /// OpenAPI description for the endpoint.
 75    /// </summary>
 776    public string? Description { get; init; } = DefaultDescription;
 77
 78    /// <summary>
 79    /// OpenAPI tags for the endpoint.
 80    /// </summary>
 781    public IEnumerable<string> Tags { get; init; } = [DefaultTag];
 82
 83    /// <summary>
 84    /// Status code used for the SSE response (default: 200).
 85    /// </summary>
 486    public string StatusCode { get; init; } = "200";
 87
 88    /// <summary>
 89    /// Response description shown in OpenAPI.
 90    /// </summary>
 691    public string? ResponseDescription { get; init; } = DefaultResponseDescription;
 92
 93    /// <summary>
 94    /// Response content type for the SSE stream (default: text/event-stream).
 95    /// </summary>
 496    public string ContentType { get; init; } = "text/event-stream";
 97
 98    /// <summary>
 99    /// OpenAPI schema type for the stream payload items (default: string).
 100    /// </summary>
 5101    public Type ItemSchemaType { get; init; } = typeof(string);
 102
 103    /// <summary>
 104    /// Optional OpenAPI schema format for the stream payload (e.g. "uuid", "date-time").
 105    /// </summary>
 0106    public string? ItemSchemaFormat { get; init; }
 107
 108    /// <summary>
 109    /// If true, the OpenAPI documentation for this endpoint will be skipped.
 110    /// </summary>
 2111    public bool SkipOpenApi { get; set; }
 112}