73 lines
2 KiB
JSON
73 lines
2 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://railiance.dev/schemas/common-workload-v1.schema.json",
|
|
"title": "Railiance common managed workload contract",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": [
|
|
"contract_version",
|
|
"workload_id",
|
|
"ownership_repo",
|
|
"criticality",
|
|
"data_classification",
|
|
"dependencies",
|
|
"identity",
|
|
"health",
|
|
"recovery",
|
|
"rail_bindings"
|
|
],
|
|
"properties": {
|
|
"contract_version": {"const": "1.0.0"},
|
|
"workload_id": {"type": "string", "pattern": "^[a-z][a-z0-9-]+$"},
|
|
"ownership_repo": {"type": "string", "pattern": "^[a-z][a-z0-9-]+$"},
|
|
"criticality": {
|
|
"enum": ["low", "medium", "high", "critical"]
|
|
},
|
|
"data_classification": {
|
|
"enum": ["public", "internal", "confidential", "restricted"]
|
|
},
|
|
"dependencies": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"uniqueItems": true
|
|
},
|
|
"identity": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["principal", "secret_references"],
|
|
"properties": {
|
|
"principal": {"type": "string", "minLength": 1},
|
|
"tenant": {"type": "string", "minLength": 1},
|
|
"secret_references": {
|
|
"type": "array",
|
|
"items": {"type": "string"},
|
|
"uniqueItems": true
|
|
}
|
|
}
|
|
},
|
|
"health": {
|
|
"type": "object",
|
|
"required": ["readiness", "smoke"],
|
|
"properties": {
|
|
"readiness": {"type": "string", "minLength": 1},
|
|
"smoke": {"type": "string", "minLength": 1},
|
|
"audit": {"type": "string"}
|
|
}
|
|
},
|
|
"recovery": {
|
|
"type": "object",
|
|
"required": ["rollback"],
|
|
"properties": {
|
|
"rollback": {"type": "string", "minLength": 1},
|
|
"rto": {"type": "string"},
|
|
"rpo": {"type": "string"}
|
|
}
|
|
},
|
|
"rail_bindings": {
|
|
"type": "array",
|
|
"minItems": 1,
|
|
"items": {"$ref": "rail-binding-v1.schema.json"},
|
|
"uniqueItems": true
|
|
}
|
|
}
|
|
}
|