EndpointOverride
@Serializable
A partial override for a shared EndpointConfig within a specific EnvironmentConfig.
Implements EndpointDefinition alongside EndpointConfig, sharing the same field names. The key difference is that name, path and method are nullable here — a null value means "keep the shared value from ApiGroupConfig.endpoints". Only id is non-null, as it is the lookup key that identifies which shared endpoint this override targets.
Merge Behaviour
Given a shared endpoint:
{ "id": "getUser", "name": "Get User", "path": "/v1/users/{userId}", "method": "GET" }Content copied to clipboard
And an override:
{ "id": "getUser", "path": "/v1/users/{userId}/profile" }Content copied to clipboard
The effective endpoint for this environment becomes:
id: getUser
name: Get User ← from shared (null in override → keep shared)
path: /v1/users/{userId}/profile ← from override
method: GET ← from shared (null in override → keep shared)Content copied to clipboard
Merge Logic
The merge is performed by ApiGroupConfig.effectiveEndpoints, which calls:
sharedEndpoint.copy(
name = override.name ?: sharedEndpoint.name,
path = override.path ?: sharedEndpoint.path,
method = override.method ?: sharedEndpoint.method
)Content copied to clipboard
See also
Properties
Link copied to clipboard
The EndpointConfig.id of the shared endpoint to override. Must match an entry in ApiGroupConfig.endpoints; unrecognised IDs are ignored.