pebble/sdk/tools/schemas/attributes.json
2025-01-27 11:38:16 -08:00

76 lines
2.1 KiB
JSON

{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Pebble JSON Schema for Attributes",
"description": "Schema for each type of valid attribute in Pebble projects",
"appKeys": {
"type": "object",
"patternProperties": {
"^\\w*$": { "$ref": "data_types.json#/UInt32" }
},
"additionalProperties": false
},
"capabilities": {
"type": "array",
"items": { "enum": ["location", "configurable", "health"] },
"uniqueItems": true
},
"messageKeys": {
"oneOf": [
{ "$ref": "attributes.json#/appKeys" },
{ "$ref": "data_types.json#/identifierArray" }
]
},
"resources": {
"type": "object",
"properties": {
"media": {
"type": "array",
"items": {
"type": "object",
"oneOf": [
{ "$ref": "resource_types.json#/bitmap" },
{ "$ref": "resource_types.json#/deprecatedImageFormat" },
{ "$ref": "resource_types.json#/font" },
{ "$ref": "resource_types.json#/raw" }
]
},
"uniqueItems": true
},
"publishedMedia": {
"type": "array",
"items": {
"type": "object",
"oneOf": [
{ "$ref": "resource_types.json#/publishedMediaAlias" },
{ "$ref": "resource_types.json#/publishedMediaGlance" },
{ "$ref": "resource_types.json#/publishedMediaTimeline" }
]
},
"uniqueItems": true
}
},
"additionalProperties": false,
"dependencies": {
"publishedMedia": [ "media" ]
}
},
"sdkVersion": { "enum": [ "2", "3" ] },
"targetPlatforms": {
"type": "array",
"items": { "enum": [ "aplite", "basalt", "chalk", "diorite" ] },
"uniqueItems": true
},
"uuid": {
"type": "string",
"pattern": "^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$"
},
"watchapp": {
"type": "object",
"properties": {
"watchface": { "type": "boolean" },
"hiddenApp": { "type": "boolean" },
"onlyShownOnCommunication": { "type": "boolean" }
},
"additionalProperties": false
}
}