Add provenance schema contract for v0.3.0
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://thinkloom.app/schemas/provenance/1.0/invocation-stream-state.schema.json",
|
||||
"title": "Invocation stream state",
|
||||
"description": "Non-authoritative operational streaming state.",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"schema_version": {
|
||||
"const": "1.0"
|
||||
},
|
||||
"stream_id": {
|
||||
"type": "string",
|
||||
"pattern": "^stream_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"invocation_id": {
|
||||
"type": "string",
|
||||
"pattern": "^invocation_[0-9A-HJKMNP-TV-Z]{26}$"
|
||||
},
|
||||
"state": {
|
||||
"enum": [
|
||||
"CREATED",
|
||||
"CONNECTING",
|
||||
"STREAMING",
|
||||
"COMPLETED",
|
||||
"FAILED",
|
||||
"CANCELLED",
|
||||
"ABANDONED",
|
||||
"RECOVERING"
|
||||
]
|
||||
},
|
||||
"bytes_received": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 67108864
|
||||
},
|
||||
"started_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time",
|
||||
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"schema_version",
|
||||
"stream_id",
|
||||
"invocation_id",
|
||||
"state",
|
||||
"bytes_received",
|
||||
"started_at",
|
||||
"updated_at"
|
||||
],
|
||||
"additionalProperties": false,
|
||||
"examples": [
|
||||
{
|
||||
"schema_version": "1.0",
|
||||
"stream_id": "stream_01J0000000000000000000000Q",
|
||||
"invocation_id": "invocation_01J00000000000000000000008",
|
||||
"state": "STREAMING",
|
||||
"bytes_received": 512,
|
||||
"started_at": "2026-07-17T18:42:10.123Z",
|
||||
"updated_at": "2026-07-17T18:43:11.456Z"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user