SchemaUtils
SchemaUtils validates SWML documents against structural rules and provides
schema-driven verb extraction and validation. Results are cached with an
LRU-style eviction policy. Set SWML_SKIP_SCHEMA_VALIDATION=true to disable
validation globally.
Constructor
opts
Optional constructor configuration.
opts.skipValidation
Skip all validation checks. When omitted, defaults to true if the
SWML_SKIP_SCHEMA_VALIDATION environment variable is "true", otherwise false.
opts.maxCacheSize
Maximum number of cached validation results before LRU eviction.
opts.schemaPath
Path to a custom JSON Schema file. When omitted, the bundled schema.json
is used. Mirrors the Python SDK’s schema_path parameter. A load failure
falls back to the bundled schema silently.