Logo Orsak

Endpoint Type

An endpoint created by one of the Route* methods, such as RouteGet, to be mapped with MapEffectEndpoints. Its methods add conventions, as on ASP.NET Core's endpoint convention builders.

Example

 runner.RouteGet("/users/%i", getUser)
     .RequiresAuthorization()
     .WithName("GetUser")

Union cases

Union case Description

Endpoint (type)

Full Usage: Endpoint (type)

Parameters:
    Item : (type)

Item : (type)

Instance members

Instance member Description

this.Add

Full Usage: this.Add

Parameters:
Returns: Endpoint

Adds a convention that changes the endpoint builder, as Add.

f : Action<EndpointBuilder>

Changes the endpoint builder

Returns: Endpoint

this.AddConvention

Full Usage: this.AddConvention

Parameters:
Returns: Endpoint
Modifiers: inline

Adds a convention to apply to the endpoint when it is mapped.

f : IEndpointConventionBuilder -> IEndpointConventionBuilder

Applies the convention to the endpoint's convention builder

Returns: Endpoint

this.AllowAnonymous

Full Usage: this.AllowAnonymous

Returns: Endpoint

Allows anonymous access, as AllowAnonymous.

Returns: Endpoint

this.RequireCors

Full Usage: this.RequireCors

Parameters:
Returns: Endpoint

Applies a CORS policy built by builder, as RequireCors.

builder : Action<CorsPolicyBuilder>

Builds the policy

Returns: Endpoint

this.RequireCors

Full Usage: this.RequireCors

Parameters:
    name : string - The name of the policy

Returns: Endpoint

Applies a named CORS policy, as RequireCors.

name : string

The name of the policy

Returns: Endpoint

this.RequiresAuthorization

Full Usage: this.RequiresAuthorization

Returns: Endpoint

Requires authorization with the default policy, as RequireAuthorization.

Returns: Endpoint

this.WithDisplayName

Full Usage: this.WithDisplayName

Parameters:
Returns: Endpoint

Sets the endpoint's display name with a function of its builder, as WithDisplayName.

f : Func<EndpointBuilder, string>

Creates the display name

Returns: Endpoint

this.WithDisplayName

Full Usage: this.WithDisplayName

Parameters:
    name : string - The display name

Returns: Endpoint

Sets the endpoint's display name, as WithDisplayName.

name : string

The display name

Returns: Endpoint

this.WithGroupName

Full Usage: this.WithGroupName

Parameters:
    name : string - The group name

Returns: Endpoint

Sets the endpoint's group name, e.g. for OpenAPI, as WithGroupName.

name : string

The group name

Returns: Endpoint

this.WithMetadata

Full Usage: this.WithMetadata

Parameters:
    items : obj[] - The metadata

Returns: Endpoint

Adds metadata to the endpoint, as WithMetadata.

items : obj[]

The metadata

Returns: Endpoint

this.WithName

Full Usage: this.WithName

Parameters:
    name : string - The name

Returns: Endpoint

Names the endpoint, e.g. for link generation, as WithName.

name : string

The name

Returns: Endpoint

Type something to start searching.