Skip to content

v0.13.0

Choose a tag to compare

@knoan knoan released this 19 Oct 16:12
· 5 commits to main since this release

Minor release adding JSON Schema descriptions, model collection and state accessors, with breaking changes to custom validators and the default predicate namespace.

Added

  • Let resource declare no members of its own: it now accepts extended shapes alone, shape-level constraints alone,
    extended shapes followed by constraints, or no arguments at all, carrying only the members it inherits
  • Add getStateId and getStateEntries state accessors to @metreeca/blue/resource, returning the identifier of a
    validated state and its values as Entry records typed by the value shape each one matches
  • Add schema to @metreeca/blue, describing the payloads a resource shape admits as a JSON Schema (draft 2020-12),
    with a strict variant keeping to the subset accepted by strict structured output generators
  • Add model to @metreeca/blue, collecting entry shapes together with every shape they extend, link to or embed,
    each once and in a stable order, so model-wide encodings can cover the whole connected model

Fixed

  • Reject reverse mappings on members whose range admits literals when the shape is built: a reverse mapping makes
    each value a subject, so it is admitted only over references, embedded resources, or unions of them

Changed

  • Run the custom validators a resource shape states only where a whole resource is validated: validateResult and
    validate with a retrieval template no longer apply them, as a retrieval may leave out any member a check reads
  • Resolve member predicates unqualified by a stated or inherited space against the base namespace (base:/#) of
    @metreeca/core/resource, which replaces the former app namespace and its app:/# origin in core 0.13.0
  • Upgrade @metreeca/core to ^0.13.0
  • Upgrade @metreeca/qest to ^0.13.0

Full Changelog: v0.12.1...v0.13.0