Validation Errors
If the DSL parser reports errors, follow these steps to diagnose and fix them.
Common validation errors
Section titled “Common validation errors”| Error | Cause | Fix |
|---|---|---|
| Unexpected token | Typo or missing brace/quote | Check the reported line for syntax issues |
| Unknown identifier | Referencing an element that isn’t defined | Ensure the element is defined with = before use |
| Duplicate key | Two views or elements share the same key | Rename one to be unique |
| Missing required block | model or views block is absent |
Add the missing block to your workspace |
How to validate
Section titled “How to validate”VS Code extension:
- Open the Command Palette →
ArchTect: Validate Architecture. - The editor highlights errors inline with line numbers.
- Fix the reported issues and re-validate.
Browser app:
- Validation errors appear in the editor diagnostics panel automatically when you edit the DSL.
- Start simple — If you have many errors, comment out sections with
//and fix one at a time. - Check braces — Most parse errors come from unmatched
{}braces. Count them carefully. - Quote strings — Element names and descriptions must be quoted with
"double quotes". - Check the DSL reference — For syntax rules, see the DSL Support Matrix or the Structurizr DSL reference.