diff --git a/server/jsonrpc/jsontypes.cpp b/server/jsonrpc/jsontypes.cpp index 4d6fa658..ca49101f 100644 --- a/server/jsonrpc/jsontypes.cpp +++ b/server/jsonrpc/jsontypes.cpp @@ -200,23 +200,23 @@ void JsonTypes::init() // Event s_event.insert("eventTypeId", basicTypeToString(Uuid)); s_event.insert("deviceId", basicTypeToString(Uuid)); - s_event.insert("params", QVariantList() << paramRef()); + s_event.insert("o:params", QVariantList() << paramRef()); // EventDescriptor s_eventDescriptor.insert("eventTypeId", basicTypeToString(Uuid)); s_eventDescriptor.insert("deviceId", basicTypeToString(Uuid)); - s_eventDescriptor.insert("paramDescriptors", QVariantList() << paramDescriptorRef()); + s_eventDescriptor.insert("o:paramDescriptors", QVariantList() << paramDescriptorRef()); // ActionType s_actionType.insert("id", basicTypeToString(Uuid)); s_actionType.insert("name", basicTypeToString(Uuid)); s_actionType.insert("index", basicTypeToString(Int)); - s_actionType.insert("o:paramTypes", QVariantList() << paramTypeRef()); + s_actionType.insert("paramTypes", QVariantList() << paramTypeRef()); // Action s_action.insert("actionTypeId", basicTypeToString(Uuid)); s_action.insert("deviceId", basicTypeToString(Uuid)); - s_action.insert("params", QVariantList() << paramRef()); + s_action.insert("o:params", QVariantList() << paramRef()); // Pugin s_plugin.insert("id", basicTypeToString(Uuid)); diff --git a/tests/auto/api.json b/tests/auto/api.json index f4a9929c..ba5f45c5 100644 --- a/tests/auto/api.json +++ b/tests/auto/api.json @@ -1,4 +1,4 @@ -40 +41 { "methods": { "Actions.ExecuteAction": { @@ -23,6 +23,7 @@ "deviceError": "$ref:DeviceError", "o:actionType": { "id": "Uuid", + "index": "Int", "name": "Uuid", "paramTypes": [ "$ref:ParamType" @@ -78,8 +79,9 @@ } }, "Devices.GetConfiguredDevices": { - "description": "Returns a list of configured devices.", + "description": "Returns a list of configured devices, optionally filtered by deviceId.", "params": { + "o:deviceId": "Uuid" }, "returns": { "devices": [ @@ -540,6 +542,7 @@ }, "ActionType": { "id": "Uuid", + "index": "Int", "name": "Uuid", "paramTypes": [ "$ref:ParamType" @@ -578,8 +581,8 @@ "Object" ], "CalendarItem": { - "duration": "UInt", - "o:datetime": "UInt", + "duration": "Uint", + "o:datetime": "Uint", "o:repeating": "$ref:RepeatingOption", "o:startTime": "Time" }, @@ -623,6 +626,9 @@ ], "id": "Uuid", "name": "String", + "o:criticalStateTypeId": "Uuid", + "o:primaryActionTypeId": "Uuid", + "o:primaryStateTypeId": "Uuid", "paramTypes": [ "$ref:ParamType" ], @@ -716,6 +722,7 @@ }, "EventType": { "id": "Uuid", + "index": "Int", "name": "String", "paramTypes": [ "$ref:ParamType" @@ -776,6 +783,7 @@ "value": "$ref:BasicType" }, "ParamType": { + "index": "Int", "name": "String", "o:allowedValues": [ "Variant" @@ -907,6 +915,7 @@ "StateType": { "defaultValue": "Variant", "id": "Uuid", + "index": "Int", "name": "String", "o:maxValue": "Variant", "o:minValue": "Variant", @@ -925,7 +934,7 @@ ] }, "TimeEventItem": { - "o:datetime": "UInt", + "o:datetime": "Uint", "o:repeating": "$ref:RepeatingOption", "o:time": "Time" }, @@ -957,6 +966,7 @@ "UnitGram", "UnitKiloGram", "UnitDezibel", + "UnitBpm", "UnitKiloByte", "UnitMegaByte", "UnitGigaByte",