EndpointDefinition

sealed interface EndpointDefinition

Common contract for endpoint definitions in the mock configuration.

This sealed interface is implemented by both EndpointConfig (a complete, standalone endpoint definition) and EndpointOverride (a partial, environment-specific replacement). Both share the same set of fields; the distinction is that all fields are non-null in EndpointConfig whereas EndpointOverride makes them nullable to express "only override the fields that differ".

Having a shared interface allows the effective-endpoint resolution logic to operate uniformly over both types without casting:

val effective: EndpointConfig = sharedEndpoint.applyOverride(override)

See also

Inheritors

Properties

Link copied to clipboard
abstract val id: String

Endpoint identifier — non-null in EndpointConfig, non-null in EndpointOverride (used as lookup key).

Link copied to clipboard
abstract val method: String?

HTTP method (GET, POST, …) — non-null in EndpointConfig, nullable in EndpointOverride.

Link copied to clipboard
abstract val name: String?

Human-readable display name — non-null in EndpointConfig, nullable in EndpointOverride.

Link copied to clipboard
abstract val path: String?

API path, may contain {param} placeholders — non-null in EndpointConfig, nullable in EndpointOverride.