JSONSchex.Types.Rule (jsonschex v0.2.1)

Copy Markdown View Source

A single compiled validation step.

The validator function accepts (data, {path, evaluated, context}) and returns :ok, {:ok, evaluated_keys}, or {:error, errors}.

Summary

Types

t()

@type t() :: %JSONSchex.Types.Rule{
  name: atom(),
  params: term(),
  validator: (term(), term() -> {:ok, MapSet.t()} | {:error, list()})
}