From 892ff46b736f7cce578545e251fd2ed39c1ef6b8 Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Fri, 20 Mar 2026 08:09:10 +0900 Subject: [PATCH] docs: Add JSON Schema for the crau-query output Signed-off-by: Daiki Ueno --- docs/query.schema.json | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/query.schema.json diff --git a/docs/query.schema.json b/docs/query.schema.json new file mode 100644 index 0000000..6776d12 --- /dev/null +++ b/docs/query.schema.json @@ -0,0 +1,35 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://github.com/latchset/crypto-auditing/docs/query.schema.json", + "title": "crypto-auditing query output format", + "description": "Output format of crau-query command", + "$defs": { + "Span": { + "type": "array", + "items": { + "type": "object", + "properties": { + "context": { "type": "string" }, + "origin": { "type": "string" }, + "start": { "type": "number" }, + "end": { "type": "number" }, + "events": { + "type": "object", + "properties": { + "name": { "type": "string" } + }, + "patternProperties": { + "^[^:]+::.+$": { + "type": ["string", "number"] + } + }, + "additionalProperties": true, + "requires": ["name"] + }, + "spans": { "$ref": "#/$defs/Span" } + } + } + } + }, + "$ref": "#/$defs/Span" +}