From 5267d35f4bb57cfa90daf3eb4d82271d2b48a493 Mon Sep 17 00:00:00 2001 From: pommicket Date: Tue, 9 Sep 2025 01:06:37 -0400 Subject: Improve schema API, more tests --- site/spec.html | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'site/spec.html') diff --git a/site/spec.html b/site/spec.html index 706e019..0222acc 100644 --- a/site/spec.html +++ b/site/spec.html @@ -673,17 +673,20 @@ and for my.nephews.car.id is String (no schema key matches, so the default of St with the initial key. removed, and their corresponding values. Returns an empty configuration if there are no descendants of key defined. -
  • - check_against_schema(conf: Configuration, schema: Configuration) -> Configuration (optional)
    - Check that schema - is a valid schema and that conf follows it, - returning an error with detailed information - if not. If successful, returns a configuration with default values filled out. -
  • merge(conf_a: Configuration, conf_b: Configuration) -> Configuration
    Returns the result of merging conf_b into conf_a.
  • +
  • + parse_schema(conf: Configuration) -> Schema (optional)
    + Parse conf as a schema, returning an error if it is invalid. +
  • +
  • + check_against_schema(conf: Configuration, schema: Schema) -> Configuration (optional)
    + Check conf follows schema, + returning an error with detailed information + if not. If successful, returns a configuration with default values filled out. +
  • Examples

    -- cgit v1.2.3