summaryrefslogtreecommitdiff
path: root/docs/development/vyos_api/schema.json
diff options
context:
space:
mode:
authorRoberto Bertó <463349+robertoberto@users.noreply.github.com>2025-11-02 19:55:55 -0300
committerGitHub <noreply@github.com>2025-11-02 19:55:55 -0300
commit6ca1269b138696b69c33d2db4bcf7dd03ea4caeb (patch)
tree4c0a634730df2123ff506252cbec050de006dac8 /docs/development/vyos_api/schema.json
parent1ada32975f0bb559ec7526e0dd545700dde1cb94 (diff)
parent6b4e9015744ab8c9f17a6b8e23387cd676b1d827 (diff)
downloadpyvyos-6ca1269b138696b69c33d2db4bcf7dd03ea4caeb.tar.gz
pyvyos-6ca1269b138696b69c33d2db4bcf7dd03ea4caeb.zip
Merge pull request #27 from vyos-contrib/feat/architecture-and-quality-improvements
feat: v0.4.0 - Architecture refactor, bug fixes, and quality improvem…
Diffstat (limited to 'docs/development/vyos_api/schema.json')
-rw-r--r--docs/development/vyos_api/schema.json2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/development/vyos_api/schema.json b/docs/development/vyos_api/schema.json
new file mode 100644
index 0000000..fb125b1
--- /dev/null
+++ b/docs/development/vyos_api/schema.json
@@ -0,0 +1,2 @@
+{"$schema":"http://json-schema.org/draft-07/schema#","$id":"https://github.com/vyos-contrib/pyvyos/docs/vyos-api/schema.json","title":"VyOS API Command Schema","description":"Schema definition for VyOS REST API commands","type":"object","definitions":{"apiRequest":{"type":"object","required":["command","op"],"properties":{"command":{"type":"string","description":"API endpoint command","enum":["configure","retrieve","show","generate","reset","config-file","reboot","poweroff","image"]},"op":{"type":"string","description":"Operation type","enum":["set","delete","showConfig","returnValues","show","generate","reset","save","load","reboot","poweroff","add","delete",""]},"path":{"oneOf":[{"type":"array","description":"Single configuration path","items":{"type":"string"}},{"type":"array","description":"Multiple configuration paths","items":{"type":"array","items":{"type":"string"}}},{"type":"array","description":"Multiple operations with paths","items":{"type":"object","required":["op","path"],"properties":{"op":{"type":"string","enum":["set","delete"]},"path":{"type":"array","items":{"type":"string"}}}]}]},"file":{"type":"string","description":"File path for file operations"},"url":{"type":"string","description":"URL for external resources","format":"uri"},"name":{"type":"string","description":"Resource name identifier"},"method":{"type":"string","description":"HTTP method","enum":["GET","POST","PUT","DELETE"],"default":"POST"}}},"apiResponse":{"type":"object","required":["success","data","error"],"properties":{"success":{"type":"boolean","description":"Whether the operation succeeded"},"data":{"description":"Response data (type varies by operation)","oneOf":[{"type":"object"},{"type":"array"},{"type":"string"},{"type":"null"}]},"error":{"oneOf":[{"type":"null"},{"type":"string"}],"description":"Error message if operation failed"}}}},"properties":{"request":{"$ref":"#/definitions/apiRequest"},"response":{"$ref":"#/definitions/apiResponse"}}}
+