context validate-osi
The validate-osi command checks a .osi.yaml file against the Open Semantic Interchange JSON schema to ensure it conforms to the specification.
context validate-osi <file>Options
Section titled “Options”| Option | Description | Default |
|---|---|---|
--format <type> | Output format: pretty or json | pretty |
Examples
Section titled “Examples”Validate a model file
Section titled “Validate a model file”context validate-osi context/models/sales.osi.yamlJSON output
Section titled “JSON output”context validate-osi context/models/sales.osi.yaml --format jsonWhat it checks
Section titled “What it checks”- Required fields (
name,datasets,fields,expression) - Correct field types and enum values
- Valid relationship references
- Valid metric expression format (dialect array)
- Schema structure matches OSI v1.0 specification
When to use
Section titled “When to use”Use validate-osi when you’re editing OSI model files directly and want to ensure they conform to the specification before running the full linter. This is especially useful when migrating from other semantic layer tools.
Next steps
Section titled “Next steps”- Run the full linter with
context lint - Check your tier score with
context tier