Go from zero to a resolved schema in four steps
Platforms are top-level containers that group related schema versions. Create one by POSTing to the platform endpoint.
curl -X POST http://localhost:3000/api/mobile \
-H "Content-Type: application/json" \
-d '{"name": "mobile", "versions": ["1.0.0"]}'{ "ok": true }Each platform can have multiple versions. Add new versions as your configuration evolves.
curl -X POST http://localhost:3000/api/mobile/versions \
-H "Content-Type: application/json" \
-d '{"version": "1.1.0"}'{ "ok": true }Retrieve the fully resolved schema for a specific version. The response includes the raw content, declared dependencies, and the merged output with all inherited values.
curl http://localhost:3000/api/mobile/1.1.0
{
"content": { "feature": { "enabled": true } },
"dependencies": ["core/1.0.0"],
"output": {
"feature": { "enabled": true },
"core": { "version": "1.0.0" }
}
}Query all platforms at once or drill into a specific platform to see its available versions.
curl http://localhost:3000/api/schemas
[
{ "name": "mobile", "versions": ["1.0.0", "1.1.0"] },
{ "name": "web", "versions": ["2.0.0"] }
]Inherit, override, and compose schemas across platforms
Schemas can inherit from other schemas using @extends. The child schema is deep-merged on top of the parent, so you only need to declare overrides.
{
"@extends": "core/1.0.0",
"feature": {
"enabled": true,
"override": "custom-value"
}
}Dependencies can use semver ranges to stay up-to-date without pinning to an exact version. Supported syntaxes include caret (^), tilde (~), and comparison operators.
// Exact version "@extends": "core/1.2.3" // Latest available "@extends": "core/latest" // Compatible versions (^, ~, >=) "@extends": "core/^1.0.0" "@extends": "core/~1.2.0" "@extends": "core/>=1.0.0"
When a base schema changes, all schemas that depend on it via @extends are automatically re-resolved. Circular dependencies are detected and rejected at save time.
// If "core/1.0.0" is updated, every schema // that declares '@extends': 'core/1.0.0' // (or a matching range) is re-processed // automatically.
What gets checked before a schema is saved
@extends reference must resolve to an existing platform/version pair.All error responses share a consistent shape. HTTP status codes follow REST conventions: 400 for bad input, 404 for missing resources, and 500 for server failures.
{ "error": "Error message" }