{ "$schema": "http://json-schema.org/draft-04/schema#", "title": "jmri-json-client-message", "type": "object", "description": "Message from client to JMRI", "properties": { "type": { "type": "string", "description": "Data type if data is present, message type otherwise" }, "data": { "type": "object", "description": "Data carried in message, see individual types for valid schemas" }, "method": { "type": "string", "enum": ["get", "put", "post", "delete", "list"], "description": "HTTP Method equivalent to be performed on data; defaults to \"get\" if not specified" }, "list": { "type": "string", "description": "Request for a list of the given type; only valid with \"type\" value of \"list\"" }, "id": { "type": "integer", "description": "A message id assigned by the client that will be attached to any messsages sent in direct response to this message; ignored if not a positive integer" } }, "oneOf": [ { "required": ["type", "data"] }, { "required": ["type", "list"] }, { "required": ["type"] } ] }