63 lines
1.6 KiB
JSON
63 lines
1.6 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://swagger-cli.dev/robot-schema/v1/success.schema.json",
|
|
"title": "Robot Success Response",
|
|
"description": "Envelope for all successful robot-mode responses from swagger-cli.",
|
|
"type": "object",
|
|
"required": ["ok", "data", "meta"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"ok": {
|
|
"type": "boolean",
|
|
"const": true
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"description": "Command-specific payload. Shape varies by command."
|
|
},
|
|
"meta": {
|
|
"$ref": "#/$defs/meta"
|
|
}
|
|
},
|
|
"$defs": {
|
|
"meta": {
|
|
"type": "object",
|
|
"required": ["schema_version", "tool_version", "command", "duration_ms"],
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"schema_version": {
|
|
"type": "integer",
|
|
"const": 1,
|
|
"description": "Robot envelope schema version. Always 1 for v1."
|
|
},
|
|
"tool_version": {
|
|
"type": "string",
|
|
"description": "SemVer version of swagger-cli that produced this output."
|
|
},
|
|
"command": {
|
|
"type": "string",
|
|
"description": "Name of the command that was executed.",
|
|
"enum": [
|
|
"fetch",
|
|
"list",
|
|
"show",
|
|
"search",
|
|
"schemas",
|
|
"tags",
|
|
"aliases",
|
|
"sync",
|
|
"doctor",
|
|
"cache",
|
|
"diff"
|
|
]
|
|
},
|
|
"duration_ms": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"description": "Wall-clock execution time in milliseconds."
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|