Type object
File match decree.schema.yaml decree.schema.yml *.decree.schema.yaml *.decree.schema.yml
Schema URL https://catalog.lintel.tools/schemas/schemastore/opendecree/latest.json
Source https://schemas.opendecree.dev/schema/v0.1.0/decree-schema.json

Versions

Validate with Lintel

npx @lintel/lintel check
Type: object

Schema definition format for OpenDecree. A decree.schema.yaml file declares the fields, types, constraints, and cross-field rules of a schema that tenants can then bind to and apply config values against.

Properties

spec_version string required

Decree schema-format spec version. Must be "v1".

Constant: "v1"
name string required

Schema name. Slug — lowercase alphanumeric + hyphens.

minLength=1maxLength=63pattern=^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
fields Record<string, object> required

The fields defined in this schema version. Map keys are field paths matching the field-path regex; at least one entry is required.

$schema string

Optional pointer to this meta-schema. HTTPS URL.

format=uripattern=^https://
$id string

Optional URN identifying this schema document. Format urn:decree:schema:(:)*.

pattern=^urn:decree:schema:[a-zA-Z0-9][a-zA-Z0-9._-]*(?::[a-zA-Z0-9][a-zA-Z0-9._-]*)*$
description string

Human-readable description of the schema.

version integer

Informational schema version number. The server assigns the next version on import; this field is round-tripped through ImportSchema / GetSchema for documentation purposes.

min=1
version_description string

Description of what changed in this schema version.

info object

Optional schema-level metadata. OAS Info Object.

4 nested properties
title string
author string
contact object
3 nested properties
name string
email string
format=email
url string
format=uri
labels Record<string, string>
dependentRequired Record<string, string[]>

Cross-field "B required when A present" rules. Each key is a trigger field path; each value is the list of dependent paths that must be non-null when the trigger is non-null. Field-existence checking is performed by the Go parser, not the meta-schema.

validations validation[]

Cross-field rules expressed in CEL. Reserved in v0.1.0 — the parser persists rules; the runtime engine ships in Phase 2 (issue #76).

Definitions

fieldPath string

Field path. ASCII letter/underscore start; alphanumeric, underscore, dot, hyphen.

field object
type string required
Values: "integer" "number" "string" "bool" "time" "duration" "url" "json"
description string
default string
nullable boolean
deprecated boolean
redirect_to string

Target field path for deprecated-field reads. Existence checked Go-side.

pattern=^[a-zA-Z_][a-zA-Z0-9_.-]*$
title string
example string
examples Record<string, object>
externalDocs object
2 nested properties
url string required
format=uri
description string
tags string[]
format string

Free-form semantic format hint (e.g. "email", "semver", "percentage"). Informational only — not enforced by validation.

readOnly boolean
writeOnce boolean
sensitive boolean
constraints object
constraintsNumeric object

Constraints valid for integer / number / duration fields.

minimum number
maximum number
exclusiveMinimum number
exclusiveMaximum number
enum array
constraintsString object

Constraints valid for string fields.

minLength integer
min=0
maxLength integer
min=0
pattern string

RE2 regex the value must match.

enum array
constraintsJSON object

Constraints valid for json fields.

json_schema string

Embedded JSON Schema (as a JSON-encoded string) for structural validation.

enum array
constraintsOther object

Constraints valid for bool / time / url fields.

enum array
info object

Optional schema-level metadata. OAS Info Object.

title string
author string
contact object
3 nested properties
name string
email string
format=email
url string
format=uri
labels Record<string, string>
example object
value string required
summary string
externalDocs object
url string required
format=uri
description string
validation object

One CEL validation rule. See cel-validation.md.

rule string required

CEL expression source. Compilation deferred to Phase 2.

minLength=1
message string required

Human-readable failure message shown to clients.

minLength=1
path string

Optional path prefix scoping the rule. Empty == schema-wide.

severity string

error (default) rejects writes; warning is non-blocking (reserved for Phase 2). Empty string permitted to match the Go parser's default-to-error behavior.

Values: "" "error" "warning"
reason string

Optional machine-readable failure code.