A tunable JSON value with a Zoi schema, such as a lesson list or candidate text.
Application code reads it with Tune.Execution.value/2 and decides
how to use it. Optimizers replace the value; the schema is code-owned and
every new value is validated against it.
Summary
Functions
Builds a parameter.
Returns the parameter with a new validated value.
Validates a value against a parameter schema.
Types
@type t() :: %Tune.Parameter{ description: String.t() | nil, schema: Zoi.schema(), value: term() }
Functions
@spec new(keyword()) :: {:ok, t()} | {:error, Exception.t()}
Builds a parameter.
Options: :schema (required JSON-compatible Zoi schema), :value (required),
and :description.
@spec put_value(t(), term()) :: {:ok, t()} | {:error, Exception.t()}
Returns the parameter with a new validated value.
@spec validate(Zoi.schema(), term()) :: {:ok, term()} | {:error, Exception.t()}
Validates a value against a parameter schema.