This VS Code extension provides real-time validation and assistance for DataOS manifest files. It helps developers catch configuration errors early by validating YAML manifests against predefined schemas and rules specific to DataOS resources.
Technical Architecture
Core Components
Extension Entry Point (src/extension.ts)
Registers the extension with VS Code
Sets up document change listeners
Manages diagnostic collection
Validator (src/validator.ts)
Implements the core validation logic
Uses AJV (Another JSON Validator) for schema validation
Includes custom validators for DataOS-specific rules
Schema (src/schemas/dataos-schema.json)
Defines the JSON Schema for DataOS manifests
Includes type definitions, required fields, and constraints
Validation Rules
1. Resource Type Rules
Cluster resources: No layer specification, version must be "v1"
Compute resources: Layer must be "system", version must be "v1beta"
Depot resources: Layer must be "user", version must be "v1"