JSON Schema
The Sovrium app schema defines the complete structure of your application configuration. Published as a standard JSON Schema, it enables editor autocomplete, real-time validation, and programmatic config verification.
Interactive Schema Explorer
Browse the full schema visually with the JSON Schema Viewer. Expand properties, view types, and explore nested structures.
Schema Explorer
Browse the Sovrium app schema interactively. Expand properties to explore types, constraints, and nested structures.
Schema URLs
Reference the Sovrium JSON Schema by URL in your editor, CI pipeline, or validation scripts.
Versioned (recommended)
Pin to a specific version for production stability. The schema URL includes the exact package version.
https://sovrium.com/schemas/0.2.0/app.schema.json
Latest
Always points to the most recent version. Convenient for development, but may introduce breaking changes.
https://sovrium.com/schemas/latest/app.schema.json
Editor Integration
Add the JSON Schema to your editor for autocomplete, inline documentation, and real-time validation as you write your Sovrium config.
VS Code
VS Code supports JSON Schema natively for both JSON and YAML files with the YAML extension.
Option 1: Add $schema directly to your config file
{
"$schema": "https://sovrium.com/schemas/0.2.0/app.schema.json",
"name": "my-app",
"version": "1.0.0"
}
Option 2: Configure in VS Code settings.json
{
"yaml.schemas": {
"https://sovrium.com/schemas/0.2.0/app.schema.json": "app.yaml"
},
"json.schemas": [
{
"url": "https://sovrium.com/schemas/0.2.0/app.schema.json",
"fileMatch": ["app.json"]
}
]
}
JetBrains
IntelliJ IDEA, WebStorm, and other JetBrains IDEs support JSON Schema mapping natively.
Go to Settings > Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings. Click + to add a new mapping, paste the schema URL below, and set the file pattern to match your config file (e.g., app.yaml or app.json).
https://sovrium.com/schemas/0.2.0/app.schema.json
Versioning
The JSON Schema follows semantic versioning aligned with the Sovrium package.
Each Sovrium release publishes a matching JSON Schema version. Breaking schema changes only occur in major version bumps.
The /schemas/latest/ URL is an alias that always redirects to the most recent version. Use it for development convenience.
For production, pin to a specific version URL to avoid unexpected validation changes when Sovrium updates.
Programmatic Validation
Validate your Sovrium configuration files against the JSON Schema in CI pipelines, pre-commit hooks, or custom scripts.
Use any JSON Schema validator library to verify your config. The example below uses Ajv, one of the most popular JSON Schema validators for JavaScript/TypeScript.
import Ajv from "ajv"
import schema from "./app.schema.json"
import config from "./app.json"
const ajv = new Ajv({ allErrors: true })
const validate = ajv.compile(schema)
if (validate(config)) {
console.log("Configuration is valid")
} else {
console.error("Validation errors:", validate.errors)
}
CI Integration
Add schema validation to your CI pipeline to catch configuration errors before deployment. The schema URL can be fetched at build time or bundled with your project.