JSON Schema 2020-12
Approval Event Log
Timestamped stages and explicit decisions.
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sharprod.com/schemas/approval-event-log.schema.json",
"title": "SHAR Production Approval Event Log Contract",
"type": "object",
"additionalProperties": false,
"properties": {
"subject_id": {
"type": "string"
},
"events": {
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"at",
"stage",
"decision"
],
"properties": {
"at": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
},
"stage": {
"enum": [
"brief",
"creative",
"offline",
"master"
]
},
"decision": {
"enum": [
"approved",
"changes_requested",
"rejected"
]
}
}
}
}
},
"required": [
"subject_id",
"events"
]
}Verified example
{
"input": {
"subject_id": "synthetic-master",
"events": [
{
"at": "2026-09-06T10:00:00Z",
"stage": "master",
"decision": "approved"
}
]
},
"result": {
"valid": true,
"errors": []
}
}Rejected example
{
"input": {
"subject_id": "synthetic-master",
"events": [
{
"at": "today",
"stage": "master",
"decision": "yes"
}
]
},
"result": {
"valid": false,
"errors": [
{
"instancePath": "/events/0/at",
"schemaPath": "#/properties/events/items/properties/at/pattern",
"keyword": "pattern",
"params": {
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
},
"message": "must match pattern \"^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$\""
}
]
}
}