Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

zyvor validate

Checks your schema without generating anything.

zyvor validate                        # defaults to rust.schema
zyvor validate .zyvor/schema.zyvor    # explicit path

Success:

Schema is valid: .zyvor/schema.zyvor

What it runs

source → lexer → parser → AST → semantic validator

No files written, no database contacted. This is the fastest way to check a schema edit.

What it catches

CategoryExamples
Syntaxunterminated string, invalid character, malformed attribute
Structuremissing @id, multiple @id, duplicate model or field names
Referencesunknown model in a relation, unknown field in fields / references
Relations@relation on a scalar field, mismatched fields / references counts
Keysreferenced column isn’t a PK or @unique
TypesFK type doesn’t match the referenced column type
M2Mincomplete or contradictory through / pivotFrom / pivotTo metadata

When to reach for it

  • Learning the schema language — tight feedback loop, no side effects.
  • In CI, as a cheap gate before generating.
  • After a big refactor, before you look at generated output.

Known gaps

Error messages don’t yet carry line/column information, and some edge cases slip through: relation cardinality/array-shape consistency, default-value type compatibility, and full @@index / @@unique field validation.

So validate passing means “no known rule violated”, not “provably correct”. Review your generated diff before applying it.