Skip to content

Releases: Lulzx/schema.art

schema 0.3.0

Choose a tag to compare

@Lulzx Lulzx released this 05 Aug 17:54

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

Choose a tag to compare

@Lulzx Lulzx released this 05 Aug 17:43

The release the registry listing points at.

arturo -p install schema
import "schema"!

user: #[name: [:string between: 2..64]  role: [:string in: ["admin" "editor"]]]
check? user person
print explain check user person

No 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

Choose a tag to compare

@Lulzx Lulzx released this 05 Aug 17:40

escuadra is now schema.

arturo -p install schema
import "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

Choose a tag to compare

@Lulzx Lulzx released this 05 Aug 17:35

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

Choose a tag to compare

@Lulzx Lulzx released this 05 Aug 17:26

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 root
  • coerce / conform — parsing and defaults as a pass separate from judgement
  • specimen — a schema read backwards, deterministic or random
  • explain — one line per fault, for humans

Requires Arturo 0.10.0 or newer. No other dependencies.