endpoint

fun <P : Parameters, I : Input<*, *>, O : Outputs> endpoint(id: String, description: String? = null, details: String? = null, builder: HttpEndpointVerbBuildingContext.() -> HttpEndpointBuildingContext<P, I, O>): HttpEndpoint<P, I, O>(source)

Builds an HttpEndpoint with an explicit id using the DSL.

Return

fully materialised HttpEndpoint built from the provided builder.

Parameters

P

tuple capturing path and query parameters.

I

inbound input definition for headers and body.

O

outbound response definitions.

id

unique identifier to assign to the endpoint (usually the property name).

description

optional short description shown in generated documentation.

details

optional long-form documentation such as business rules or references.

builder

DSL block invoked on a fresh HttpEndpointVerbBuildingContext.


fun <T, P : Parameters, I : Input<*, *>, O : Outputs> endpoint(description: String? = null, details: String? = null, builder: HttpEndpointVerbBuildingContext.() -> HttpEndpointBuildingContext<P, I, O>): ReadOnlyProperty<T, HttpEndpoint<P, I, O>>(source)

Declares an HTTP endpoint builder that captures property metadata at declaration time.

The returned delegate instantiates a HttpEndpointVerbBuildingContext so the caller can choose the verb and URI together, then chain header and body builders before materialising a HttpEndpoint.

Return

property delegate that records endpoint metadata using the owning property name and produces HttpEndpoint.

Parameters

T

owner type that will receive the property.

P

tuple capturing path and query parameters.

I

inbound input definition for headers and body.

O

outbound response definitions.

description

optional short description shown in generated documentation.

details

optional long-form documentation such as business rules or references.

builder

DSL block building the endpoint structure using HttpEndpointVerbBuildingContext.

See also