88 lines
3.5 KiB
JSON
88 lines
3.5 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://niancode.local/schemas/works-deploy-check.schema.json",
|
|
"title": "Works Square deployment check",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schema_version", "status", "checked_at", "zip_file_path", "zip_sha256", "checks"],
|
|
"properties": {
|
|
"schema_version": { "const": 1 },
|
|
"status": { "$ref": "#/$defs/status" },
|
|
"checked_at": { "type": "string", "format": "date-time" },
|
|
"zip_file_path": { "type": "string", "minLength": 1 },
|
|
"zip_sha256": { "type": "string", "pattern": "^[a-fA-F0-9]{64}$" },
|
|
"checks": {
|
|
"type": "object",
|
|
"required": ["compose_config", "compose_build", "compose_up", "container_port", "http_smoke", "fresh_directory_smoke", "sandbox_browser_smoke"],
|
|
"properties": {
|
|
"compose_config": { "$ref": "#/$defs/check" },
|
|
"compose_build": { "$ref": "#/$defs/check" },
|
|
"compose_up": { "$ref": "#/$defs/check" },
|
|
"container_port": { "$ref": "#/$defs/check" },
|
|
"http_smoke": { "$ref": "#/$defs/check" },
|
|
"fresh_directory_smoke": { "$ref": "#/$defs/check" },
|
|
"sandbox_browser_smoke": { "$ref": "#/$defs/check" },
|
|
"game_canvas_smoke": { "$ref": "#/$defs/gameCanvasCheck" }
|
|
},
|
|
"additionalProperties": { "$ref": "#/$defs/check" }
|
|
}
|
|
},
|
|
"$defs": {
|
|
"status": { "enum": ["PASS", "BLOCKED"] },
|
|
"measurement": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["width", "height"],
|
|
"properties": {
|
|
"width": { "type": "number", "exclusiveMinimum": 0 },
|
|
"height": { "type": "number", "exclusiveMinimum": 0 }
|
|
}
|
|
},
|
|
"canvasEvidence": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["logical_resolution", "desktop_viewport", "mobile_viewport", "desktop_canvas", "mobile_canvas", "expected_max_canvas", "resize_verified"],
|
|
"properties": {
|
|
"logical_resolution": { "$ref": "#/$defs/measurement" },
|
|
"desktop_viewport": { "$ref": "#/$defs/measurement" },
|
|
"mobile_viewport": { "$ref": "#/$defs/measurement" },
|
|
"desktop_canvas": { "$ref": "#/$defs/measurement" },
|
|
"mobile_canvas": { "$ref": "#/$defs/measurement" },
|
|
"expected_max_canvas": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["desktop", "mobile"],
|
|
"properties": {
|
|
"desktop": { "$ref": "#/$defs/measurement" },
|
|
"mobile": { "$ref": "#/$defs/measurement" }
|
|
}
|
|
},
|
|
"resize_verified": { "type": "boolean" }
|
|
}
|
|
},
|
|
"check": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["status", "detail", "command"],
|
|
"properties": {
|
|
"status": { "$ref": "#/$defs/status" },
|
|
"detail": { "type": "string", "minLength": 1 },
|
|
"command": { "type": "string", "minLength": 1 },
|
|
"checked_at": { "type": "string", "format": "date-time" }
|
|
}
|
|
},
|
|
"gameCanvasCheck": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["status", "detail", "command", "canvas_evidence"],
|
|
"properties": {
|
|
"status": { "$ref": "#/$defs/status" },
|
|
"detail": { "type": "string", "minLength": 1 },
|
|
"command": { "type": "string", "minLength": 1 },
|
|
"checked_at": { "type": "string", "format": "date-time" },
|
|
"canvas_evidence": { "$ref": "#/$defs/canvasEvidence" }
|
|
}
|
|
}
|
|
}
|
|
}
|