PtcRunner.Validator (PtcRunner v0.2.0)

View Source

Validates DSL programs against the schema.

Ensures operations have correct structure and required fields.

Summary

Functions

Validates an AST node against the DSL schema.

Functions

validate(ast)

@spec validate(map()) :: :ok | {:error, {:validation_error, String.t()}}

Validates an AST node against the DSL schema.

Arguments

  • ast: The AST to validate

Returns

  • :ok if valid
  • {:error, {:validation_error, message}} if invalid