Class OpenApiEndpointOptions
Namespace: Cephalon.AspNetCore.Documentation
Assembly: Cephalon.AspNetCore.dll
Configures the host-level OpenAPI JSON and Scalar UI endpoints exposed by Cephalon ASP.NET Core hosts.
public sealed class OpenApiEndpointOptionsInheritance
Section titled “Inheritance”object ← OpenApiEndpointOptions
Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”These options stay in the ASP.NET Core adapter because they describe HTTP route layout for generated documentation assets rather than engine-core behavior.
Constructors
Section titled “Constructors”OpenApiEndpointOptions()
Section titled “ OpenApiEndpointOptions()”Initializes a new
public OpenApiEndpointOptions()Fields
Section titled “Fields”SectionName
Section titled “ SectionName”Gets the root configuration section used for OpenAPI endpoint routing.
public const string SectionName = "OpenApi"Field Value
Section titled “Field Value”Properties
Section titled “Properties”BehaviorRestDocumentedStatusCodes
Section titled “ BehaviorRestDocumentedStatusCodes”Gets or sets the HTTP status codes that Cephalon’s behavior-owned REST helpers publish in OpenAPI documents by default.
public IReadOnlyList<int> BehaviorRestDocumentedStatusCodes { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”This list controls documentation metadata only. It does not change the runtime HTTP status codes emitted by ASP.NET Core.
RoutePattern
Section titled “ RoutePattern”Gets or sets the route pattern used by MapOpenApi(…).
public string RoutePattern { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The pattern must include the {documentName} placeholder so versioned and named documents remain addressable.
ScalarRoutePrefix
Section titled “ ScalarRoutePrefix”Gets or sets the route prefix used by the Scalar UI.
public string ScalarRoutePrefix { get; set; }Property Value
Section titled “Property Value”Remarks
Section titled “Remarks”The value may be supplied with or without a leading slash. Cephalon normalizes it to a rooted path such as /scalar.
Methods
Section titled “Methods”FromConfiguration(IConfiguration, string)
Section titled “ FromConfiguration(IConfiguration, string)”Binds and normalizes OpenAPI endpoint options from configuration.
public static OpenApiEndpointOptions FromConfiguration(IConfiguration configuration, string sectionPath = "OpenApi")Parameters
Section titled “Parameters”configuration IConfiguration
The application configuration root.
sectionPath string
The configuration section path to bind.
Returns
Section titled “Returns”The normalized OpenAPI endpoint options.