Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ApiGroupConfig(val id: String, val name: String, val endpoints: List<EndpointConfig>, val environments: List<EnvironmentConfig>)

Configuration for a named, stable API group (e.g. "my-backend", "jsonplaceholder").

Link copied to clipboard
@Serializable
data class EndpointConfig(val id: String, val name: String, val path: String, val method: String) : EndpointDefinition

Configuration for a single API endpoint that can be mocked.

Link copied to clipboard
sealed interface EndpointDefinition

Common contract for endpoint definitions in the mock configuration.

Link copied to clipboard
@Serializable
data class EndpointDescriptor(val key: EndpointKey, val config: EndpointConfig, val availableResponses: List<MockResponse>)

Represents the static descriptor for an available endpoint and its mock responses.

Link copied to clipboard
@Serializable
data class EndpointKey(val groupId: String, val environmentId: String, val endpointId: String)

A stable, value-type identifier for the triple (groupId, environmentId, endpointId).

Link copied to clipboard
@Serializable
sealed interface EndpointMockState

Represents the mocking state for a single API endpoint.

Link copied to clipboard
@Serializable
data class EndpointOverride(val id: String, val name: String? = null, val path: String? = null, val method: String? = null) : EndpointDefinition

A partial override for a shared EndpointConfig within a specific EnvironmentConfig.

Link copied to clipboard
@Serializable
data class EnvironmentConfig(val id: String, val name: String, val url: String, val endpointOverrides: List<EndpointOverride> = emptyList(), val additionalEndpoints: List<EndpointConfig> = emptyList())

Configuration for a single deployment environment within an ApiGroupConfig.

Link copied to clipboard
@Serializable
data class MockConfiguration(val apiGroups: List<ApiGroupConfig>)

Root configuration for network mocking, loaded from mocks.json.

Link copied to clipboard
data class MockMatch(val key: EndpointKey, val config: EndpointConfig)

Represents a matched mock configuration for an incoming HTTP request.

Link copied to clipboard
@Serializable
data class MockResponse(val statusCode: Int, val fileName: String, val displayName: String, val content: String)

Represents a loaded mock response that can be returned by the network mock plugin.

Link copied to clipboard
@Serializable
data class NetworkMockState(val globalMockingEnabled: Boolean = false, val endpointStates: Map<String, EndpointMockState> = emptyMap(), val lastModified: Long = 0)

Represents the complete state of network mocking, persisted in DataStore.

Link copied to clipboard

Functions

Link copied to clipboard

Builds the effective endpoint list for a given ApiGroupConfig and EnvironmentConfig pair.