Skip to main content
View as Markdown

Validation & Schema Generation

Two things belong here: checking a config without starting anything, and emitting the JSON Schema that describes every config. Both are commands, and both work on every distribution — the binary, Docker, Homebrew.

sovrium validate <file>

The pre-deploy gate.

>_ terminal
sovrium validate app.yaml

Prints Valid configuration: <name> and exits 0, or the errors and exits 1. Everything that fails exits 1, so gating a pipeline is one line:

>_ terminal
sovrium validate app.yaml || exit 1

Validating from inside a config

To check a config from a running app — a webhook that accepts a submitted config, a scheduled audit of a config in storage — use the data:validate-config automation action. It runs the same decoder sovrium validate runs, with no side effects and no boot.

app.yaml
automations:
  - name: check-submitted-config
    trigger:
      type: webhook
      method: POST
    actions:
      - name: check
        type: data
        operator: validate-config
        props:
          config: '{{trigger.body.config}}'
          format: json

The step exposes {{steps.check.valid}} and {{steps.check.errors}}. See Data Actions for the full operator list.

sovrium schema

Print the JSON Schema (Draft-07) for the app configuration — the same document the hosted schema URLs serve.

>_ terminal
sovrium schema
sovrium schema --output app.schema.json

It takes no arguments beyond the output path and reads nothing from the environment: the schema is derived from AppSchema itself, so the output depends only on the Sovrium version. That makes it safe to regenerate in CI and diff — a change in the file is a change in the schema, never in the machine that ran it.

A common use is pinning the schema alongside the config so editors validate against the exact version you deploy:

>_ terminal
# Run after every Sovrium upgrade
sovrium schema --output app.schema.json
app.yaml
# app.yaml
# yaml-language-server: $schema=./app.schema.json
name: my-app

Last updated August 11, 2026

This documentation was written with AI, so errors or outdated content are possible. Sovrium is in beta. Contributions and corrections are welcome.

Built with Sovrium