thecr3w-dev/contracts/schemas/update-metadata.schema.json

93 lines
2.7 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://contracts.thecr3wnet.com/schemas/update-metadata.schema.json",
"title": "TheCr3wNativeReleaseMetadata",
"description": "Kanoniczny schemat metadanych wydania aplikacji natywnych (Android & Windows) podpisanych Ed25519",
"type": "object",
"required": [
"release_id",
"app_id",
"version",
"version_code",
"platform",
"architecture",
"channel",
"mandatory",
"minimum_supported_version",
"file_size",
"sha256",
"published_at",
"signature_ed25519"
],
"properties": {
"release_id": {
"type": "string",
"format": "uuid"
},
"app_id": {
"type": "string",
"pattern": "^[a-z0-9_.-]+$",
"description": "Identyfikator aplikacji (np. com.thecr3w.app, thecr3w-desktop)"
},
"version": {
"type": "string",
"pattern": "^[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9.]+)?$",
"description": "Wersja aplikacji w formacie SemVer"
},
"version_code": {
"type": "integer",
"minimum": 1,
"description": "Monotonicznie rosnący kod wersji (dla Android i Windows)"
},
"platform": {
"type": "string",
"enum": ["android", "windows"]
},
"architecture": {
"type": "string",
"enum": ["arm64-v8a", "armeabi-v7a", "x86_64", "x86", "arm64", "universal"]
},
"channel": {
"type": "string",
"enum": ["stable", "beta", "nightly"]
},
"mandatory": {
"type": "boolean",
"description": "Czy aktualizacja jest obowiązkowa (blokująca starsze wersje)"
},
"minimum_supported_version": {
"type": "string",
"description": "Minimalna wspierana wersja; wersje poniżej tej wartości wymagają natychmiastowej aktualizacji"
},
"file_size": {
"type": "integer",
"minimum": 1,
"description": "Dokładny rozmiar artefaktu binarnego w bajtach"
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$",
"description": "Kryptograficzna suma kontrolna SHA256 pliku binarnego (APK, EXE, MSI, ZIP)"
},
"published_at": {
"type": "string",
"format": "date-time"
},
"release_notes": {
"type": "string",
"description": "Changelog w formacie Markdown"
},
"download_url": {
"type": "string",
"format": "uri",
"description": "Dynamiczny, krótko żyjący (pre-signed) URL do bezpośredniego pobrania z Cloudflare R2"
},
"signature_ed25519": {
"type": "string",
"pattern": "^[a-f0-9]{128}$",
"description": "Podpis cyfrowy Ed25519 w hex (64 bajty) wyliczony z kanonicznej postaci JSON metadanych wydania"
}
},
"additionalProperties": false
}