Repository navigation
Releases: Lulzx/schema.art
Release list
schema 0.3.0
specimen is now example, the same word as the example: rule, because both name one idea: a value the schema accepts. The rule states one the generator cannot invent; the function derives the rest.
Breaking: specimen and specimen.random no longer exist. Rename call sites to example and example.random; nothing else changed.
schema 0.2.1
The release the registry listing points at.
arturo -p install schemaimport "schema"!
user: #[name: [:string between: 2..64] role: [:string in: ["admin" "editor"]]]
check? user person
print explain check user personNo code change since 0.2.0 — the interface is check, check?, coerce, conform, specimen and explain, and those six are all this splices into your scope.
schema 0.2.0
escuadra is now schema.
arturo -p install schemaimport "schema"!The interface is unchanged — check, check?, coerce, conform, specimen, explain — and remains the only thing spliced into your scope; internals now carry a sch prefix. The old escuadra releases stay where they are; the repository redirects from its old URL.
escuadra 0.1.1
Namespace hygiene, ahead of listing.
import "escuadra"! splices into the caller's scope, so it now splices only the interface — check, check?, coerce, conform, specimen, explain — and prefixes every internal with esc. describe in particular goes back to unitt, which exports it as a suite keyword.
No change to what any of the six do.
escuadra 0.1.0
First release.
A schema is an ordinary Arturo dictionary; constraints are ordinary blocks. Nothing is a macro or a special form.
check/check?— every fault collected, with a path from the rootcoerce/conform— parsing and defaults as a pass separate from judgementspecimen— a schema read backwards, deterministic or randomexplain— one line per fault, for humans
Requires Arturo 0.10.0 or newer. No other dependencies.