30 lines
1 KiB
JSON
30 lines
1 KiB
JSON
|
|
{
|
||
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||
|
|
"$id": "https://reuse-surface.local/schemas/reuse-event.schema.json",
|
||
|
|
"title": "ReuseEvent",
|
||
|
|
"description": "One line of registry/telemetry/plan-check-events.jsonl, or one POST /v1/reuse-events body (REUSE-WP-0019-T04). Shared schema so plan-check's local fallback and the hub's telemetry store never diverge.",
|
||
|
|
"type": "object",
|
||
|
|
"additionalProperties": false,
|
||
|
|
"required": ["ts", "consumer_repo", "verdict", "source"],
|
||
|
|
"properties": {
|
||
|
|
"ts": {"type": "string", "format": "date-time"},
|
||
|
|
"consumer_repo": {"type": "string", "minLength": 1},
|
||
|
|
"capability_id": {
|
||
|
|
"type": ["string", "null"],
|
||
|
|
"pattern": "^capability\\.[a-z0-9]+(\\.[a-z0-9-]+)+$"
|
||
|
|
},
|
||
|
|
"verdict": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": ["reuse", "extend", "new"]
|
||
|
|
},
|
||
|
|
"outcome": {
|
||
|
|
"type": ["string", "null"],
|
||
|
|
"enum": ["reused", "extended", "new", "skipped", null]
|
||
|
|
},
|
||
|
|
"source": {
|
||
|
|
"type": "string",
|
||
|
|
"enum": ["plan-check", "manual", "hub"]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|