The Rust equivalent of json-schema-faker, scoped to what's actually useful in Rust: resolves $ref (relative to whichever file references it)/allOf, fills const/enum/default, and builds a value only for properties listed in required - everything else is left out. For code that has to construct a raw serde_json::Value against a schema it doesn't own, instead of a typed struct. Verified against continuum-schemas' real bambulab schemas manually, and against local fixtures in tests (round-tripped through the jsonschema crate to confirm the output actually validates). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MWQVtBGxHYLkVw2kBupd5g
14 lines
273 B
JSON
14 lines
273 B
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"title": "ItemDeletedEvent",
|
|
"allOf": [
|
|
{ "$ref": "../common/envelope.schema.json" },
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"type": { "const": "item_deleted" }
|
|
}
|
|
}
|
|
]
|
|
}
|