Add SCUM current-service map asset contract

This commit is contained in:
npc0-hue
2026-08-13 10:19:39 +08:00
parent 5331143806
commit 25a823f298
7 changed files with 341 additions and 2 deletions
@@ -0,0 +1,54 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "SCUMCurrentServiceMapMetadata",
"type": "object",
"additionalProperties": false,
"required": ["key", "mapVersion", "adapterVersion", "requiredSchemaFingerprint", "sourceEvidence", "authorization", "worldBounds", "image", "layers", "transformAssetPath"],
"properties": {
"key": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]{0,119}$" },
"mapVersion": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$" },
"adapterVersion": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]{0,79}$" },
"requiredSchemaFingerprint": { "type": "string", "pattern": "^sha256:[a-fA-F0-9]{64}$" },
"sourceEvidence": { "type": "string", "minLength": 1, "maxLength": 240 },
"authorization": {
"type": "object",
"additionalProperties": false,
"required": ["redistribution", "baseMapArtwork", "renderingAvailability"],
"properties": {
"redistribution": { "const": "first-party-generated-coordinate-metadata" },
"baseMapArtwork": { "const": "not-packaged" },
"renderingAvailability": { "const": "unavailable-until-authorized-base-map" }
}
},
"worldBounds": {
"type": "object",
"additionalProperties": false,
"required": ["minX", "minY", "maxX", "maxY"],
"properties": { "minX": { "type": "number" }, "minY": { "type": "number" }, "maxX": { "type": "number" }, "maxY": { "type": "number" } }
},
"image": {
"type": "object",
"additionalProperties": false,
"required": ["width", "height"],
"properties": { "width": { "type": "integer", "minimum": 1 }, "height": { "type": "integer", "minimum": 1 } }
},
"layers": {
"type": "array",
"minItems": 1,
"maxItems": 8,
"items": {
"type": "object",
"additionalProperties": false,
"required": ["key", "capability", "subjectType", "label", "sourceQueryKey"],
"properties": {
"key": { "enum": ["players", "vehicles", "flags"] },
"capability": { "const": "positions.read" },
"subjectType": { "enum": ["player", "vehicle", "flag"] },
"label": { "type": "string", "minLength": 1, "maxLength": 40 },
"sourceQueryKey": { "const": "scum-positions-read" }
}
}
},
"transformAssetPath": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._/-]{0,240}$" }
}
}