Class BehaviorRestEndpointGroup
Namespace: Cephalon.Behaviors.Http.Hosting
Assembly: Cephalon.Behaviors.Http.dll
Wraps a Minimal API route group so REST endpoints can dispatch directly into Cephalon behaviors while keeping module metadata, OpenAPI tags, and version defaults aligned.
public sealed class BehaviorRestEndpointGroup : IEndpointConventionBuilderInheritance
Section titled “Inheritance”object ← BehaviorRestEndpointGroup
Implements
Section titled “Implements”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Extension Methods
Section titled “Extension Methods”CephalonRateLimitingEndpointConventionBuilderExtensions.ApplyCephalonRateLimiting<BehaviorRestEndpointGroup>(BehaviorRestEndpointGroup, IServiceProvider, string, string?), IdentityEndpointConventionBuilderExtensions.WithCephalonAuthenticationSchemes<BehaviorRestEndpointGroup>(BehaviorRestEndpointGroup, params string[])
Properties
Section titled “Properties”ApiVersionMajor
Section titled “ ApiVersionMajor”Gets the explicit API major version applied to newly mapped endpoints when configured.
public int? ApiVersionMajor { get; }Property Value
Section titled “Property Value”int?
Module
Section titled “ Module”Gets the module instance that owns the route group.
public IModule Module { get; }Property Value
Section titled “Property Value”IModule
ModuleDescriptor
Section titled “ ModuleDescriptor”Gets the descriptor for the owning module.
public ModuleDescriptor ModuleDescriptor { get; }Property Value
Section titled “Property Value”ModuleDescriptor
ModuleVersionMajor
Section titled “ ModuleVersionMajor”Gets the major version parsed from the module descriptor when available.
public int? ModuleVersionMajor { get; }Property Value
Section titled “Property Value”int?
OpenApiDocumentName
Section titled “ OpenApiDocumentName”Gets the OpenAPI document name that newly mapped endpoints join by default.
public string OpenApiDocumentName { get; }Property Value
Section titled “Property Value”Routes
Section titled “ Routes”Gets the underlying Minimal API route group.
public RouteGroupBuilder Routes { get; }Property Value
Section titled “Property Value”TagDescription
Section titled “ TagDescription”Gets the OpenAPI tag description used for endpoints in this group when one is available.
public string? TagDescription { get; }Property Value
Section titled “Property Value”TagName
Section titled “ TagName”Gets the OpenAPI tag name used for endpoints in this group.
public string TagName { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”Add(Action<EndpointBuilder>)
Section titled “ Add(Action<EndpointBuilder>)”Adds the specified convention to the builder. Conventions are used to customize
public void Add(Action<EndpointBuilder> convention)Parameters
Section titled “Parameters”convention Action<EndpointBuilder>
The convention to add to the builder.
ApiVersion(int)
Section titled “ ApiVersion(int)”Assigns subsequently mapped endpoints to the OpenAPI document represented by the supplied API major version.
public BehaviorRestEndpointGroup ApiVersion(int major)Parameters
Section titled “Parameters”major int
The API major version to apply.
Returns
Section titled “Returns”The same group instance for fluent endpoint composition.
Remarks
Section titled “Remarks”Call this before mapping endpoints when a module needs its REST surface to appear in a document other than the default v1.
MapBehaviorDelete<TBehavior>(string, Action<RouteHandlerBuilder>?)
Section titled “ MapBehaviorDelete<TBehavior>(string, Action<RouteHandlerBuilder>?)”Maps a REST DELETE endpoint that dispatches into the specified behavior.
public RouteHandlerBuilder MapBehaviorDelete<TBehavior>(string pattern, Action<RouteHandlerBuilder>? configure = null) where TBehavior : classParameters
Section titled “Parameters”pattern string
The route pattern relative to the group prefix.
configure Action<RouteHandlerBuilder>?
Optional callback for additional Minimal API conventions such as authorization or custom response metadata.
Returns
Section titled “Returns”The route handler builder for further customization.
Type Parameters
Section titled “Type Parameters”TBehavior
The behavior type to dispatch.
MapBehaviorGet<TBehavior>(string, Action<RouteHandlerBuilder>?)
Section titled “ MapBehaviorGet<TBehavior>(string, Action<RouteHandlerBuilder>?)”Maps a REST GET endpoint that dispatches into the specified behavior.
public RouteHandlerBuilder MapBehaviorGet<TBehavior>(string pattern, Action<RouteHandlerBuilder>? configure = null) where TBehavior : classParameters
Section titled “Parameters”pattern string
The route pattern relative to the group prefix.
configure Action<RouteHandlerBuilder>?
Optional callback for additional Minimal API conventions such as authorization or custom response metadata.
Returns
Section titled “Returns”The route handler builder for further customization.
Type Parameters
Section titled “Type Parameters”TBehavior
The behavior type to dispatch.
MapBehaviorPatch<TBehavior>(string, Action<RouteHandlerBuilder>?)
Section titled “ MapBehaviorPatch<TBehavior>(string, Action<RouteHandlerBuilder>?)”Maps a REST PATCH endpoint that dispatches into the specified behavior.
public RouteHandlerBuilder MapBehaviorPatch<TBehavior>(string pattern, Action<RouteHandlerBuilder>? configure = null) where TBehavior : classParameters
Section titled “Parameters”pattern string
The route pattern relative to the group prefix.
configure Action<RouteHandlerBuilder>?
Optional callback for additional Minimal API conventions such as authorization or custom response metadata.
Returns
Section titled “Returns”The route handler builder for further customization.
Type Parameters
Section titled “Type Parameters”TBehavior
The behavior type to dispatch.
MapBehaviorPost<TBehavior>(string, Action<RouteHandlerBuilder>?)
Section titled “ MapBehaviorPost<TBehavior>(string, Action<RouteHandlerBuilder>?)”Maps a REST POST endpoint that dispatches into the specified behavior.
public RouteHandlerBuilder MapBehaviorPost<TBehavior>(string pattern, Action<RouteHandlerBuilder>? configure = null) where TBehavior : classParameters
Section titled “Parameters”pattern string
The route pattern relative to the group prefix.
configure Action<RouteHandlerBuilder>?
Optional callback for additional Minimal API conventions such as authorization or custom response metadata.
Returns
Section titled “Returns”The route handler builder for further customization.
Type Parameters
Section titled “Type Parameters”TBehavior
The behavior type to dispatch.
MapBehaviorPut<TBehavior>(string, Action<RouteHandlerBuilder>?)
Section titled “ MapBehaviorPut<TBehavior>(string, Action<RouteHandlerBuilder>?)”Maps a REST PUT endpoint that dispatches into the specified behavior.
public RouteHandlerBuilder MapBehaviorPut<TBehavior>(string pattern, Action<RouteHandlerBuilder>? configure = null) where TBehavior : classParameters
Section titled “Parameters”pattern string
The route pattern relative to the group prefix.
configure Action<RouteHandlerBuilder>?
Optional callback for additional Minimal API conventions such as authorization or custom response metadata.
Returns
Section titled “Returns”The route handler builder for further customization.
Type Parameters
Section titled “Type Parameters”TBehavior
The behavior type to dispatch.
WithOpenApiDocumentName(string)
Section titled “ WithOpenApiDocumentName(string)”Overrides the OpenAPI document name applied to subsequently mapped endpoints in this group.
public BehaviorRestEndpointGroup WithOpenApiDocumentName(string openApiDocumentName)Parameters
Section titled “Parameters”openApiDocumentName string
The OpenAPI document name to publish.
Returns
Section titled “Returns”The same group instance for fluent endpoint composition.
WithTagDescription(string?)
Section titled “ WithTagDescription(string?)”Overrides the OpenAPI tag description applied to this group.
public BehaviorRestEndpointGroup WithTagDescription(string? description)Parameters
Section titled “Parameters”description string?
The tag description to publish. Pass null to clear it.
Returns
Section titled “Returns”The same group instance for fluent endpoint composition.
WithTagName(string)
Section titled “ WithTagName(string)”Overrides the OpenAPI tag name applied to subsequently mapped endpoints in this group.
public BehaviorRestEndpointGroup WithTagName(string tagName)Parameters
Section titled “Parameters”tagName string
The public tag name to publish.
Returns
Section titled “Returns”The same group instance for fluent endpoint composition.