Mock

@Serializable
@SerialName(value = "mock")
data class Mock(val responseFile: String) : EndpointMockState

The endpoint will return a mock response loaded from responseFile.

Constructors

Link copied to clipboard
constructor(responseFile: String)

Properties

Link copied to clipboard
open override val displayName: String

The response file name without its .json extension, used as a concise UI label (e.g. "getUser-200" for "getUser-200.json").

Link copied to clipboard

The file name of the selected mock response (e.g. "getUser-200.json"). Used as the key to load the response via com.worldline.devview.networkmock.core.repository.MockConfigRepository.loadMockResponse. The status code and display name are derived from this name at runtime — they are not stored here to avoid redundancy with MockResponse.

Link copied to clipboard

The HTTP status code parsed from responseFile, or null if the file name does not match the expected {endpointId}-{statusCode}[-{suffix}].json format.