| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- {
- "$schema": "https://json-schema.org/draft/2020-12/schema",
- "$id": "https://zcode.dev/schemas/release-candidate.v1.schema.json",
- "title": "ZCode Release Candidate v1",
- "type": "object",
- "additionalProperties": false,
- "required": [
- "schemaVersion",
- "candidateId",
- "source",
- "state",
- "platforms",
- "provenance",
- "createdAt"
- ],
- "properties": {
- "schemaVersion": {
- "const": "release-candidate.v1"
- },
- "candidateId": {
- "type": "string",
- "pattern": "^cand_[A-Za-z0-9_-]{8,128}$"
- },
- "source": {
- "$ref": "#/$defs/source"
- },
- "state": {
- "enum": [
- "created",
- "building",
- "ready",
- "approval_pending",
- "approved",
- "publishing",
- "published",
- "build_failed",
- "rejected",
- "publish_failed_retryable",
- "cancelled"
- ]
- },
- "platforms": {
- "type": "array",
- "minItems": 1,
- "items": {
- "$ref": "#/$defs/platformManifest"
- }
- },
- "provenance": {
- "$ref": "#/$defs/provenance"
- },
- "createdAt": {
- "type": "string",
- "format": "date-time"
- },
- "expiresAt": {
- "type": "string",
- "format": "date-time"
- }
- },
- "$defs": {
- "source": {
- "type": "object",
- "additionalProperties": false,
- "required": ["repository", "commit", "version"],
- "properties": {
- "repository": {
- "type": "string",
- "minLength": 1,
- "maxLength": 256
- },
- "commit": {
- "type": "string",
- "pattern": "^[0-9a-f]{40,64}$"
- },
- "version": {
- "type": "string",
- "pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(-[0-9A-Za-z.-]+)?(\\+[0-9A-Za-z.-]+)?$"
- },
- "ref": {
- "type": "string",
- "maxLength": 512
- }
- }
- },
- "platform": {
- "type": "object",
- "additionalProperties": false,
- "required": ["os", "arch"],
- "properties": {
- "os": {
- "enum": ["macos", "windows", "linux"]
- },
- "arch": {
- "enum": ["x64", "arm64"]
- }
- }
- },
- "digest": {
- "type": "object",
- "additionalProperties": false,
- "required": ["sha256", "sha512"],
- "properties": {
- "sha256": {
- "type": "string",
- "pattern": "^[a-f0-9]{64}$"
- },
- "sha512": {
- "type": "string",
- "pattern": "^[A-Za-z0-9+/]{86}==$"
- }
- }
- },
- "artifact": {
- "type": "object",
- "additionalProperties": false,
- "required": ["artifactId", "role", "fileName", "objectKey", "size", "digest"],
- "properties": {
- "artifactId": {
- "type": "string",
- "pattern": "^art_[A-Za-z0-9_-]{8,128}$"
- },
- "role": {
- "enum": ["installer", "blockmap", "update_metadata_base", "auxiliary"]
- },
- "fileName": {
- "type": "string",
- "minLength": 1,
- "maxLength": 512,
- "pattern": "^[^/\\\\]+$"
- },
- "objectKey": {
- "type": "string",
- "minLength": 1,
- "maxLength": 2048,
- "pattern": "^[^/].*$"
- },
- "size": {
- "type": "integer",
- "minimum": 0
- },
- "digest": {
- "$ref": "#/$defs/digest"
- }
- }
- },
- "platformManifest": {
- "type": "object",
- "additionalProperties": false,
- "required": ["platform", "artifacts", "baseUpdateMetadata"],
- "properties": {
- "platform": {
- "$ref": "#/$defs/platform"
- },
- "artifacts": {
- "type": "array",
- "minItems": 1,
- "items": {
- "$ref": "#/$defs/artifact"
- }
- },
- "baseUpdateMetadata": {
- "$ref": "#/$defs/artifact"
- }
- }
- },
- "provenance": {
- "type": "object",
- "additionalProperties": false,
- "required": ["builder", "builderImage", "tools"],
- "properties": {
- "builder": {
- "type": "string",
- "minLength": 1,
- "maxLength": 256
- },
- "builderImage": {
- "type": "string",
- "minLength": 1,
- "maxLength": 512
- },
- "tools": {
- "type": "object",
- "minProperties": 1,
- "additionalProperties": {
- "type": "string",
- "maxLength": 256
- }
- },
- "signer": {
- "type": "string",
- "maxLength": 256
- }
- }
- }
- }
- }
|