add command for getting schema via json api (#179)

* - update coding style
- add command for getting schema via json api
- json api: merge config commands into one single "config" command with subcommands

* make setconfig work
This commit is contained in:
redPanther
2016-08-15 22:32:01 +02:00
committed by GitHub
parent 75fd7ed8ba
commit 8e8c21fa3b
11 changed files with 183 additions and 90 deletions

View File

@@ -0,0 +1,23 @@
{
"type":"object",
"required":true,
"properties":{
"command": {
"type" : "string",
"required" : true,
"enum" : ["config"]
},
"subcommand": {
"type" : "string",
"required" : true,
"enum" : ["getconfig","setconfig","getschema"]
},
"config": {
"type" : "object"
},
"create": {
"type" : "boolean"
}
},
"additionalProperties": false
}

View File

@@ -1,12 +0,0 @@
{
"type":"object",
"required":true,
"properties":{
"command": {
"type" : "string",
"required" : true,
"enum" : ["configget"]
}
},
"additionalProperties": false
}

View File

@@ -1,20 +0,0 @@
{
"type" : "object",
"required" : true,
"properties" : {
"command": {
"type" : "string",
"required" : true,
"enum" : ["configset"]
},
"configset": {
"type" : "object",
"required" : true
},
"create": {
"type" : "boolean",
"required" : false
}
},
"additionalProperties": false
}

View File

@@ -5,7 +5,7 @@
"command": {
"type" : "string",
"required" : true,
"enum" : ["color", "image", "effect", "serverinfo", "clear", "clearall", "transform", "correction", "temperature", "adjustment", "sourceselect", "configget", "configset", "componentstate"]
"enum" : ["color", "image", "effect", "serverinfo", "clear", "clearall", "transform", "correction", "temperature", "adjustment", "sourceselect", "config", "componentstate"]
}
}
}