Package-level declarations
Core server, stub registration, and configuration.
Core server, stub registration, and configuration.
Core server, stub registration, and configuration.
Core server, stub registration, and configuration.
Types
Defines the building step for associating an inbound RequestSpecification with its corresponding response definition. This class is part of a fluent API used to define mappings between request specifications and their respective responses.
This annotation marks the Mokksy API that is considered experimental and is not subject to the general compatibility guarantees. The behaviour of such API may change, or the API may be removed completely in any further release.
API marked with this annotation is internal, and it is not intended to be used outside Mokksy. It could be modified or removed without any notice. Using it outside Mokksy could cause undefined behaviour and/or any unexpected effects.
A Java-friendly wrapper around BuildingStep that exposes respondsWith, respondsWithStream, and respondsWithSseStream as instance methods accepting Consumer instead of Kotlin suspend lambdas.
Java-friendly wrapper around RequestSpecificationBuilder that replaces Kotlin functional types with their java.util.function equivalents.
Java-friendly wrapper around ResponseDefinitionBuilder that returns this from every mutating method, enabling fluent chaining without Kotlin-specific idioms.
Java-friendly wrapper around StreamingResponseDefinitionBuilder that returns this from every mutating method, enabling fluent chaining without Kotlin-specific idioms.
Controls which requests are recorded in the dev.mokksy.mokksy.request.RequestJournal.
Minimal contract for embedding Mokksy stub handling into a Ktor application.
An embedded mock HTTP server for testing. Registers stubs for any HTTP method and verifies request expectations after the test.
Configuration for a MokksyServer instance.
Java-friendly factory for creating ServerSentEvent instances without trailing nulls.
Fluent builder for ServerSentEvent.
Configuration for a stub's lifecycle and logging behaviour.
Functions
Reified shortcut for MokksyServer.delete with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.delete with an optional stub name. Infers P from the call site.
Reified shortcut for MokksyServer.get with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.get with an optional stub name. Infers P from the call site.
Reified shortcut for MokksyServer.head with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.head with an optional stub name. Infers P from the call site.
Reified shortcut for MokksyServer.method with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.method with an optional stub name. Infers P from the call site.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Creates a MokksyServer — idiomatic Kotlin entry point for all platforms.
Installs Mokksy request handling into this Application.
Mounts Mokksy request handling into this Route scope.
Reified shortcut for MokksyServer.options with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.options with an optional stub name. Infers P from the call site.
Reified shortcut for MokksyServer.patch with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.patch with an optional stub name. Infers P from the call site.
Reified shortcut for MokksyServer.post with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.post with an optional stub name. Infers P from the call site.
Reified shortcut for MokksyServer.put with a StubConfiguration. Infers P from the call site.
Reified shortcut for MokksyServer.put with an optional stub name. Infers P from the call site.
Java-friendly overload for BuildingStep.respondsWith.
Java-friendly overload for BuildingStep.respondsWithStream.
Stops the Mokksy server, blocking until shutdown is complete.
Stops the Mokksy server on the given dispatcher, blocking until shutdown is complete.
Starts the Mokksy server and blocks until the port is bound and ready to accept requests.
Starts the Mokksy server on the given dispatcher, blocking until the port is bound.