Files
mavlink/component_metadata/peripherals.schema.json
Beat Küng 3b52eac09c add COMPONENT_METADATA, deprecate COMPONENT_INFORMATION (#1823)
* component_information/general.schema.json: make crc optional, remove translation crc

* rename component_information -> component_metadata

* common.xml: add COMPONENT_METADATA, deprecate COMPONENT_INFORMATION

The peripherals is added to the general json with optional CRC, and can
use the (future) dynamic update mechanism.

COMPONENT_INFORMATION can be removed after a transition period.

* COMPONENT_INFORMATION tidy - mark as deprecated rather than wip using tag

* general.schema.json: make https mandatory

* Apply suggestions from code review

Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
2022-04-13 20:36:10 +10:00

94 lines
4.2 KiB
JSON

{
"$id": "https://mavlink.io/comp_version.schema.json",
"$schema": "http://json-schema.org/draft-07/schema",
"description": "Schema for COMP_METADATA_TYPE_PERIPHERALS",
"type": "object",
"properties": {
"version": {
"description": "Version number for the format of this file.",
"type": "integer",
"minimum": 1
},
"peripherals": {
"type": "array",
"description": "All external peripherals",
"items": {
"name": {
"type": "string",
"description": "Human-readable name of the peripheral."
},
"vendorName": {
"type": "string",
"description": "Name of the peripheral vendor."
},
"modelName": {
"type": "string",
"description": "Name of the peripheral model."
},
"firmwareVersion": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+(\\.\\d+)?$",
"description": "major.minor.patch.dev format"
},
"hardwareVersion": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+(\\.\\d+)?$",
"description": "major.minor.patch.dev format"
},
"metadataTypes": {
"type": "array",
"description": "Which `COMP_METADATA_TYPE` specs are supported, with URI's.",
"items": {
"type": "object",
"properties": {
"type": {
"description": "COMP_METADATA_TYPE",
"type": "integer"
},
"uri": {
"description": "http[s] or MAVLink FTP uri",
"type": "string"
},
"fileCrc": {
"description": "CRC32 checksum of the file",
"type": "integer"
},
"uriFallback": {
"description": "Fallback URI when primary is not available",
"type": "string"
},
"fileCrcFallback": {
"description": "CRC32 checksum of the fallback file",
"type": "integer"
},
"translationUri": {
"description": "http[s] or MAVLink FTP url",
"type": "string"
},
"translationFileCrc": {
"description": "CRC32 checksum of the translation file",
"type": "integer"
},
"translationUriFallback": {
"description": "Fallback URI when primary translation is not available",
"type": "string"
},
"translationFileCrcFallback": {
"description": "CRC32 checksum of the translation fallback file",
"type": "integer"
}
},
"required": [ "type", "uri", "fileCrc", "uriFallback", "fileCrcFallback" ],
"additionalProperties": false
}
}
},
"required": [ "name" ],
"additionalProperties": false
}
},
"required": [ "version", "peripherals" ],
"additionalProperties": false
}