ApiGroupConfig
Configuration for a named, stable API group (e.g. "my-backend", "jsonplaceholder").
An API group is the top-level organisational unit in the mock configuration. It represents a logical backend that the application communicates with, regardless of which environment is active. It defines:
A shared pool of endpoints that exist across all environments
A list of environments, each providing the base URL for this group at a given deployment stage, along with optional per-environment endpoint overrides and additions
Shared Endpoints vs. Environment-Specific Variations
Endpoints are defined once in endpoints and shared across all environments. When an endpoint differs in a specific environment (different path, name or method), an EndpointOverride can be declared inside that EnvironmentConfig. Endpoints that only exist in a specific environment are declared in EnvironmentConfig.additionalEndpoints.
Example
{
"id": "my-backend",
"name": "My Backend",
"endpoints": [
{ "id": "getUser", "name": "Get User", "path": "/v1/users/{userId}", "method": "GET" }
],
"environments": [
{ "id": "staging", "name": "Staging", "url": "https://staging.api.example.com" },
{ "id": "production", "name": "Production", "url": "https://api.example.com" }
]
}See also
Constructors
Properties
Shared endpoint definitions, available in all environments unless overridden or omitted via EnvironmentConfig.endpointOverrides / EnvironmentConfig.additionalEndpoints
List of deployment stages for this group, each providing the resolved base URL and optional endpoint customisations
Functions
Builds the effective endpoint list for a given ApiGroupConfig and EnvironmentConfig pair.