Skip to content

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.

Terminal window
context validate-osi <file>
OptionDescriptionDefault
--format <type>Output format: pretty or jsonpretty
Terminal window
context validate-osi context/models/sales.osi.yaml
Terminal window
context validate-osi context/models/sales.osi.yaml --format json
  • 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

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.