This commit is contained in:
2025-07-08 11:06:57 +08:00
parent 03e20a7c87
commit f552dc75f9
3 changed files with 118 additions and 60 deletions

View File

@ -39,41 +39,7 @@
"pattern": "^[A-Za-z0-9_-]{21}$"
},
"dev_type": {
"description": "Device model identifier.",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"oneOf": [
{
"required": [
"type_id"
],
"properties": {
"type_id": {
"type": "string",
"format": "nanoid",
"pattern": "^[A-Za-z0-9_-]{21}$"
}
},
"additionalProperties": false
},
{
"required": [
"type_name"
],
"properties": {
"type_name": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
"$ref": "#/definitions/DeviceType"
},
"timestamp": {
"$ref": "#/definitions/Timestamp"
@ -220,6 +186,43 @@
},
"additionalProperties": false
},
"DeviceType": {
"description": "Device model identifier.",
"oneOf": [
{
"type": "string"
},
{
"type": "object",
"oneOf": [
{
"required": [
"type_id"
],
"properties": {
"type_id": {
"type": "string",
"format": "nanoid",
"pattern": "^[A-Za-z0-9_-]{21}$"
}
},
"additionalProperties": false
},
{
"required": [
"type_name"
],
"properties": {
"type_name": {
"type": "string"
}
},
"additionalProperties": false
}
]
}
]
},
"FieldMetadata": {
"type": "object",
"description": "Metadata describing a field value.",
@ -322,11 +325,21 @@
"properties": {
"coordinates": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 2,
"maxItems": 2
"maxItems": 2,
"items": [
{
"type": "number",
"minimum": -180,
"maximum": 180
},
{
"type": "number",
"minimum": -90,
"maximum": 90
}
],
"additionalItems": false
},
"coordinate_system": {
"type": "string",