Skip to content

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 : IEndpointConventionBuilder

objectBehaviorRestEndpointGroup

IEndpointConventionBuilder

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

CephalonRateLimitingEndpointConventionBuilderExtensions.ApplyCephalonRateLimiting<BehaviorRestEndpointGroup>(BehaviorRestEndpointGroup, IServiceProvider, string, string?), IdentityEndpointConventionBuilderExtensions.WithCephalonAuthenticationSchemes<BehaviorRestEndpointGroup>(BehaviorRestEndpointGroup, params string[])

Gets the explicit API major version applied to newly mapped endpoints when configured.

public int? ApiVersionMajor { get; }

int?

Gets the module instance that owns the route group.

public IModule Module { get; }

IModule

Gets the descriptor for the owning module.

public ModuleDescriptor ModuleDescriptor { get; }

ModuleDescriptor

Gets the major version parsed from the module descriptor when available.

public int? ModuleVersionMajor { get; }

int?

Gets the OpenAPI document name that newly mapped endpoints join by default.

public string OpenApiDocumentName { get; }

string

Gets the underlying Minimal API route group.

public RouteGroupBuilder Routes { get; }

RouteGroupBuilder

Gets the OpenAPI tag description used for endpoints in this group when one is available.

public string? TagDescription { get; }

string?

Gets the OpenAPI tag name used for endpoints in this group.

public string TagName { get; }

string

Adds the specified convention to the builder. Conventions are used to customize instances.

public void Add(Action<EndpointBuilder> convention)

convention Action<EndpointBuilder>

The convention to add to the builder.

Assigns subsequently mapped endpoints to the OpenAPI document represented by the supplied API major version.

public BehaviorRestEndpointGroup ApiVersion(int major)

major int

The API major version to apply.

BehaviorRestEndpointGroup

The same group instance for fluent endpoint composition.

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 : class

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.

RouteHandlerBuilder

The route handler builder for further customization.

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 : class

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.

RouteHandlerBuilder

The route handler builder for further customization.

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 : class

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.

RouteHandlerBuilder

The route handler builder for further customization.

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 : class

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.

RouteHandlerBuilder

The route handler builder for further customization.

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 : class

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.

RouteHandlerBuilder

The route handler builder for further customization.

TBehavior

The behavior type to dispatch.

Overrides the OpenAPI document name applied to subsequently mapped endpoints in this group.

public BehaviorRestEndpointGroup WithOpenApiDocumentName(string openApiDocumentName)

openApiDocumentName string

The OpenAPI document name to publish.

BehaviorRestEndpointGroup

The same group instance for fluent endpoint composition.

Overrides the OpenAPI tag description applied to this group.

public BehaviorRestEndpointGroup WithTagDescription(string? description)

description string?

The tag description to publish. Pass null to clear it.

BehaviorRestEndpointGroup

The same group instance for fluent endpoint composition.

Overrides the OpenAPI tag name applied to subsequently mapped endpoints in this group.

public BehaviorRestEndpointGroup WithTagName(string tagName)

tagName string

The public tag name to publish.

BehaviorRestEndpointGroup

The same group instance for fluent endpoint composition.