HttpEndpoint

data class HttpEndpoint<out P : Parameters, out I : Input<*, *>, out O : Outputs>(val id: String, val description: String?, val details: String?, val method: Method, val path: List<String>, val parameters: P, val input: I, val outputs: O)(source)

Fully-configured HTTP endpoint ready for code generation.

Parameters

P

tuple capturing referenced path and query parameters.

I

inbound definition coupling headers with the request body.

O

outbound response definitions paired with status matchers.

Constructors

Link copied to clipboard
constructor(id: String, description: String?, details: String?, method: Method, path: List<String>, parameters: P, input: I, outputs: O)

Properties

Link copied to clipboard

short summary describing the endpoint intent.

Link copied to clipboard

optional long-form documentation such as business rules.

Link copied to clipboard
val id: String

unique identifier inferred from the property name.

Link copied to clipboard
val input: I

request definition including headers and body.

Link copied to clipboard

HTTP verb associated with the endpoint.

Link copied to clipboard
val outputs: O

candidate response definitions matched by status.

Link copied to clipboard

tuple capturing referenced path and query parameters.

Link copied to clipboard

ordered URI segments forming the template.

Functions

Link copied to clipboard

Resolves this endpoint's path into a concrete URI when no parameters are captured.

fun <P1 : Any> HttpEndpoint<Parameters1<P1>, *, *>.toURI(p1: P1): URI

Resolves this endpoint's path into a concrete URI by substituting p1.

fun <P1 : Any, P2 : Any> HttpEndpoint<Parameters2<P1, P2>, *, *>.toURI(p1: P1, p2: P2): URI

Resolves this endpoint's path into a concrete URI by substituting p1 and p2.

fun <P1 : Any, P2 : Any, P3 : Any> HttpEndpoint<Parameters3<P1, P2, P3>, *, *>.toURI(p1: P1, p2: P2, p3: P3): URI

Resolves this endpoint's path into a concrete URI by substituting p1, p2, and p3.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any> HttpEndpoint<Parameters4<P1, P2, P3, P4>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p4.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any, P5 : Any> HttpEndpoint<Parameters5<P1, P2, P3, P4, P5>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p5.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any, P5 : Any, P6 : Any> HttpEndpoint<Parameters6<P1, P2, P3, P4, P5, P6>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p6.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any, P5 : Any, P6 : Any, P7 : Any> HttpEndpoint<Parameters7<P1, P2, P3, P4, P5, P6, P7>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p7.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any, P5 : Any, P6 : Any, P7 : Any, P8 : Any> HttpEndpoint<Parameters8<P1, P2, P3, P4, P5, P6, P7, P8>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p8.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any, P5 : Any, P6 : Any, P7 : Any, P8 : Any, P9 : Any> HttpEndpoint<Parameters9<P1, P2, P3, P4, P5, P6, P7, P8, P9>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p9.

fun <P1 : Any, P2 : Any, P3 : Any, P4 : Any, P5 : Any, P6 : Any, P7 : Any, P8 : Any, P9 : Any, P10 : Any> HttpEndpoint<Parameters10<P1, P2, P3, P4, P5, P6, P7, P8, P9, P10>, *, *>.toURI(p1: P1, p2: P2, p3: P3, p4: P4, p5: P5, p6: P6, p7: P7, p8: P8, p9: P9, p10: P10): URI

Resolves this endpoint's path into a concrete URI by substituting p1 through p10.