Valetudo/backend/lib/webserver/capabilityRouters/doc/ZoneCleaningCapabilityRoute...

132 lines
3.7 KiB
JSON

{
"/api/v2/robot/capabilities/ZoneCleaningCapability": {
"put": {
"tags": [
"ZoneCleaningCapability"
],
"summary": "Clean one or more zones",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"action": {
"type": "string",
"enum": [
"clean"
]
},
"zones": {
"type": "array",
"description": "Zones clean",
"items": {
"$ref": "#/components/schemas/ValetudoZone"
}
},
"iterations": {
"type": "number"
}
}
},
"examples": {
"spot":{
"description": "Clean a small spot",
"value": {
"action": "clean",
"zones": [
{
"points": {
"pA": {
"x": 2720,
"y": 3655
},
"pB": {
"x": 2850,
"y": 3655
},
"pC": {
"x": 2850,
"y": 3705
},
"pD": {
"x": 2720,
"y": 3705
}
}
}
],
"iterations": 1
}
}
}
}
}
},
"responses": {
"200": {
"$ref": "#/components/responses/200"
},
"400": {
"$ref": "#/components/responses/400"
}
}
}
},
"/api/v2/robot/capabilities/ZoneCleaningCapability/properties": {
"get": {
"tags": [
"ZoneCleaningCapability"
],
"summary": "Get various capability-related properties",
"responses": {
"200": {
"description": "Ok",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": false,
"required": [
"zoneCount",
"iterationCount"
],
"properties": {
"zoneCount": {
"type": "object",
"additionalProperties": false,
"properties": {
"min": {
"minimum": 1,
"type": "number"
},
"max": {
"minimum": 1,
"type": "number"
}
}
},
"iterationCount": {
"type": "object",
"additionalProperties": false,
"properties": {
"min": {
"minimum": 1,
"type": "number"
},
"max": {
"minimum": 1,
"type": "number"
}
}
}
}
}
}
}
}
}
}
}
}