options

inline fun <P : Any> MokksyServer.options(name: String? = null, noinline block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)

Reified shortcut for MokksyServer.options with an optional stub name. Infers P from the call site.

Return

A BuildingStep for response configuration and stub registration.

Parameters

name

Optional identifier for this stub.

block

Lambda to configure the RequestSpecificationBuilder.

Type Parameters

P

The expected type of the request body.


inline fun <P : Any> MokksyServer.options(configuration: StubConfiguration, noinline block: RequestSpecificationBuilder<P>.() -> Unit): BuildingStep<P>(source)

Reified shortcut for MokksyServer.options with a StubConfiguration. Infers P from the call site.

Return

A BuildingStep for response configuration and stub registration.

Parameters

configuration

The StubConfiguration controlling stub behaviour (name, priority, etc.).

block

Lambda to configure the RequestSpecificationBuilder.

Type Parameters

P

The expected type of the request body.