Expand description
Example generators for schema validation
This module provides constructors for generating minimal and full examples of xchecker’s JSON output formats (receipt, status, doctor). These examples are used for schema validation and documentation.
All examples use:
- Fixed timestamps for deterministic output
BTreeMapfor deterministic key ordering- Sorted arrays (by path for outputs/artifacts, by name for checks)
- Pinned tool versions for byte-identical assertions
Functions§
- fixed_
now - Fixed timestamp for deterministic examples Only available in test builds to avoid accidental use in production
- make_
example_ doctor_ full - Generate full doctor example (all check types)
- make_
example_ doctor_ minimal - Generate minimal doctor example (basic checks)
- make_
example_ receipt_ full - Generate full receipt example (all fields populated)
Uses
BTreeMapfor flags and sorts arrays for deterministic output - make_
example_ receipt_ minimal - Generate minimal receipt example (required fields only) Uses fixed timestamp for deterministic output
- make_
example_ status_ full - Generate full status example (all fields populated)
- make_
example_ status_ minimal - Generate minimal status example (required fields only)