BuildingStep

class BuildingStep<P : Any>

Defines the building step for associating an inbound request specification with its corresponding response definition. This class is part of a fluent API used to define mappings between request specifications and their respective responses.

Parameters

P

The type of the request payload.

Functions

Link copied to clipboard
infix fun <T : Any> respondsWith(block: ResponseDefinitionBuilder<P, T>.() -> Unit)

Associates the current request specification with a response definition. This method is part of a fluent API for defining mappings between requests and responses.

fun <T : Any> respondsWith(responseType: KClass<T>, block: ResponseDefinitionBuilder<P, T>.() -> Unit)
Link copied to clipboard
infix fun <T : Any> respondsWithSseStream(block: StreamingResponseDefinitionBuilder<P, <Error class: unknown class><T>>.() -> Unit)

Associates the current request specification with a server-sent events (SSE) streaming response definition. This method is part of a fluent API for defining mappings between requests and SSE streaming responses.

fun <T : Any> respondsWithSseStream(responseType: KClass<T>, block: StreamingResponseDefinitionBuilder<P, <Error class: unknown class><T>>.() -> Unit)
Link copied to clipboard

Associates the current request specification with a streaming response definition. This method is part of a fluent API for defining mappings between requests and streaming responses.

fun <T : Any> respondsWithStream(responseType: KClass<T>, block: StreamingResponseDefinitionBuilder<P, T>.() -> Unit)