endpoint

open 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 endpoint immediately using the supplied id.

The builder runs against a fresh HttpEndpointVerbBuildingContext, which forces the DSL to choose the HTTP method and URI first and then refine the request and response shapes.


open 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 endpoint as a property delegate.

This variant exists so endpoint definitions can stay close to the Kotlin property that names them. The delegate reuses the property name as the endpoint HttpEndpoint.id, which keeps the declaration concise while still producing the same immutable endpoint contract.