@itentialopensource/adapter-thingspace 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +0 -1
- package/.jshintrc +3 -0
- package/AUTH.md +44 -16
- package/CALLS.md +26 -26
- package/CHANGELOG.md +16 -0
- package/CONTRIBUTING.md +1 -160
- package/ENHANCE.md +2 -2
- package/README.md +31 -22
- package/adapter.js +159 -330
- package/adapterBase.js +538 -873
- package/changelogs/changelog.md +24 -0
- package/metadata.json +47 -0
- package/package.json +22 -25
- package/pronghorn.json +474 -142
- package/propertiesSchema.json +452 -40
- package/refs?service=git-upload-pack +0 -0
- package/report/adapter-openapi.json +4020 -0
- package/report/adapter-openapi.yaml +2994 -0
- package/report/adapterInfo.json +8 -8
- package/report/updateReport1691507577332.json +120 -0
- package/report/updateReport1692202573890.json +120 -0
- package/report/updateReport1694461772493.json +120 -0
- package/report/updateReport1698420941061.json +120 -0
- package/sampleProperties.json +63 -2
- package/test/integration/adapterTestBasicGet.js +1 -1
- package/test/integration/adapterTestConnectivity.js +91 -42
- package/test/integration/adapterTestIntegration.js +130 -2
- package/test/unit/adapterBaseTestUnit.js +388 -314
- package/test/unit/adapterTestUnit.js +306 -109
- package/utils/adapterInfo.js +1 -1
- package/utils/addAuth.js +1 -1
- package/utils/artifactize.js +1 -1
- package/utils/checkMigrate.js +1 -1
- package/utils/entitiesToDB.js +1 -0
- package/utils/findPath.js +1 -1
- package/utils/methodDocumentor.js +71 -23
- package/utils/modify.js +13 -15
- package/utils/packModificationScript.js +1 -1
- package/utils/taskMover.js +309 -0
- package/utils/tbScript.js +3 -10
- package/utils/tbUtils.js +2 -3
- package/utils/testRunner.js +1 -1
- package/utils/troubleshootingAdapter.js +1 -3
- package/workflows/README.md +0 -3
package/propertiesSchema.json
CHANGED
|
@@ -18,6 +18,11 @@
|
|
|
18
18
|
"minimum": 1,
|
|
19
19
|
"maximum": 65535
|
|
20
20
|
},
|
|
21
|
+
"choosepath": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "choose the path to use -- requires entityPath choices",
|
|
24
|
+
"default": ""
|
|
25
|
+
},
|
|
21
26
|
"base_path": {
|
|
22
27
|
"type": "string",
|
|
23
28
|
"description": "a base path that is consistent across api calls",
|
|
@@ -78,6 +83,14 @@
|
|
|
78
83
|
"https"
|
|
79
84
|
]
|
|
80
85
|
},
|
|
86
|
+
"service": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Service we are integrating with -- used with AWS Authentication",
|
|
89
|
+
"examples": [
|
|
90
|
+
"ec2",
|
|
91
|
+
"route53"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
81
94
|
"authentication": {
|
|
82
95
|
"$ref": "#/definitions/authentication"
|
|
83
96
|
},
|
|
@@ -101,6 +114,9 @@
|
|
|
101
114
|
},
|
|
102
115
|
"devicebroker": {
|
|
103
116
|
"$ref": "#/definitions/devicebroker"
|
|
117
|
+
},
|
|
118
|
+
"cache": {
|
|
119
|
+
"$ref": "#/definitions/cache"
|
|
104
120
|
}
|
|
105
121
|
},
|
|
106
122
|
"required": [
|
|
@@ -123,7 +139,8 @@
|
|
|
123
139
|
"jwt_token",
|
|
124
140
|
"request_token",
|
|
125
141
|
"no_authentication",
|
|
126
|
-
"multi_step_authentication"
|
|
142
|
+
"multi_step_authentication",
|
|
143
|
+
"aws_authentication"
|
|
127
144
|
]
|
|
128
145
|
},
|
|
129
146
|
"username": {
|
|
@@ -256,6 +273,74 @@
|
|
|
256
273
|
"type": "string",
|
|
257
274
|
"description": "The grant type for OAuth requests - can also provide in schema",
|
|
258
275
|
"default": ""
|
|
276
|
+
},
|
|
277
|
+
"sensitive": {
|
|
278
|
+
"type": "array",
|
|
279
|
+
"description": "List of sensitive keys to search and hide values from being logged",
|
|
280
|
+
"default": [],
|
|
281
|
+
"items": {
|
|
282
|
+
"type": "string"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"sso": {
|
|
286
|
+
"type": "object",
|
|
287
|
+
"properties": {
|
|
288
|
+
"protocol": {
|
|
289
|
+
"type": "string",
|
|
290
|
+
"description": "the protocol to request token from system",
|
|
291
|
+
"default": "",
|
|
292
|
+
"enum": [
|
|
293
|
+
"http",
|
|
294
|
+
"https",
|
|
295
|
+
""
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
"host": {
|
|
299
|
+
"type": "string",
|
|
300
|
+
"description": "hostname of the authentication system",
|
|
301
|
+
"default": "",
|
|
302
|
+
"examples": [
|
|
303
|
+
"systemx.customer.com"
|
|
304
|
+
]
|
|
305
|
+
},
|
|
306
|
+
"port": {
|
|
307
|
+
"type": "integer",
|
|
308
|
+
"description": "port on which to connect to the authentication system",
|
|
309
|
+
"default": 0,
|
|
310
|
+
"minimum": 0,
|
|
311
|
+
"maximum": 65535
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
},
|
|
315
|
+
"multiStepAuthCalls": {
|
|
316
|
+
"type": "array",
|
|
317
|
+
"items": {
|
|
318
|
+
"type": "object",
|
|
319
|
+
"properties": {
|
|
320
|
+
"name": {
|
|
321
|
+
"type": "string",
|
|
322
|
+
"description": "Id of the step call",
|
|
323
|
+
"examples": [
|
|
324
|
+
"getAccessToken"
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
"requestFields": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"description": "The fields set in step request"
|
|
330
|
+
},
|
|
331
|
+
"responseFields": {
|
|
332
|
+
"type": "object",
|
|
333
|
+
"description": "The fields from the step result"
|
|
334
|
+
},
|
|
335
|
+
"successfullResponseCode": {
|
|
336
|
+
"type": "integer",
|
|
337
|
+
"description": "Expected response code for given step, if not set any successfull http response is accepted",
|
|
338
|
+
"examples": [
|
|
339
|
+
200
|
|
340
|
+
]
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
259
344
|
}
|
|
260
345
|
},
|
|
261
346
|
"required": [
|
|
@@ -358,7 +443,13 @@
|
|
|
358
443
|
},
|
|
359
444
|
"query_object": {
|
|
360
445
|
"type": "object",
|
|
361
|
-
"description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter"
|
|
446
|
+
"description": "Query object { device: xxxxx } to be placed into the healthcheck, will be converted to query string by the adapter",
|
|
447
|
+
"default": {}
|
|
448
|
+
},
|
|
449
|
+
"addlHeaders": {
|
|
450
|
+
"type": "object",
|
|
451
|
+
"description": "headers that will be appended to the headers for the call",
|
|
452
|
+
"default": {}
|
|
362
453
|
}
|
|
363
454
|
},
|
|
364
455
|
"required": [
|
|
@@ -438,6 +529,7 @@
|
|
|
438
529
|
"priorities": {
|
|
439
530
|
"type": "array",
|
|
440
531
|
"description": "define your priorities here",
|
|
532
|
+
"default": [],
|
|
441
533
|
"items": {
|
|
442
534
|
"type": "object",
|
|
443
535
|
"properties": {
|
|
@@ -508,6 +600,7 @@
|
|
|
508
600
|
"failover_codes": {
|
|
509
601
|
"type": "array",
|
|
510
602
|
"description": "An array of codes where it is ok to try another method",
|
|
603
|
+
"default": [],
|
|
511
604
|
"items": {
|
|
512
605
|
"type": "integer"
|
|
513
606
|
}
|
|
@@ -525,19 +618,23 @@
|
|
|
525
618
|
"properties": {
|
|
526
619
|
"payload": {
|
|
527
620
|
"type": "object",
|
|
528
|
-
"description": "payload fields that will be appended to the provided payload (excluding GET calls)"
|
|
621
|
+
"description": "payload fields that will be appended to the provided payload (excluding GET calls)",
|
|
622
|
+
"default": {}
|
|
529
623
|
},
|
|
530
624
|
"uriOptions": {
|
|
531
625
|
"type": "object",
|
|
532
|
-
"description": "options that will be appended to all GET calls"
|
|
626
|
+
"description": "options that will be appended to all GET calls",
|
|
627
|
+
"default": {}
|
|
533
628
|
},
|
|
534
629
|
"addlHeaders": {
|
|
535
630
|
"type": "object",
|
|
536
|
-
"description": "headers that will be appended to the headers for the call"
|
|
631
|
+
"description": "headers that will be appended to the headers for the call",
|
|
632
|
+
"default": {}
|
|
537
633
|
},
|
|
538
634
|
"authData": {
|
|
539
635
|
"type": "object",
|
|
540
|
-
"description": "authentication data that will be appended to the payload for authentication calls"
|
|
636
|
+
"description": "authentication data that will be appended to the payload for authentication calls",
|
|
637
|
+
"default": {}
|
|
541
638
|
}
|
|
542
639
|
}
|
|
543
640
|
},
|
|
@@ -852,6 +949,7 @@
|
|
|
852
949
|
"type": "array",
|
|
853
950
|
"description": "Broker call(s) to getDevice",
|
|
854
951
|
"items": {
|
|
952
|
+
"type": "object",
|
|
855
953
|
"properties": {
|
|
856
954
|
"path": {
|
|
857
955
|
"type": "string",
|
|
@@ -867,26 +965,38 @@
|
|
|
867
965
|
"type": "object",
|
|
868
966
|
"description": "The json object with query parameters of the call to getDevice",
|
|
869
967
|
"additionalProperties": {
|
|
870
|
-
"type":
|
|
968
|
+
"type": [
|
|
969
|
+
"string",
|
|
970
|
+
"number"
|
|
971
|
+
]
|
|
871
972
|
}
|
|
872
973
|
},
|
|
873
974
|
"body": {
|
|
874
975
|
"type": "object",
|
|
875
976
|
"description": "The json object with body of the call to getDevice",
|
|
876
977
|
"additionalProperties": {
|
|
877
|
-
"type":
|
|
978
|
+
"type": [
|
|
979
|
+
"string",
|
|
980
|
+
"number"
|
|
981
|
+
]
|
|
878
982
|
}
|
|
879
983
|
},
|
|
880
984
|
"headers": {
|
|
881
985
|
"type": "object",
|
|
882
986
|
"description": "The json object with headers of the call to getDevice",
|
|
883
987
|
"additionalProperties": {
|
|
884
|
-
"type":
|
|
988
|
+
"type": [
|
|
989
|
+
"string",
|
|
990
|
+
"number"
|
|
991
|
+
]
|
|
885
992
|
}
|
|
886
993
|
},
|
|
887
994
|
"handleFailure": {
|
|
888
995
|
"type": "string",
|
|
889
|
-
"enum": [
|
|
996
|
+
"enum": [
|
|
997
|
+
"ignore",
|
|
998
|
+
"fail"
|
|
999
|
+
],
|
|
890
1000
|
"description": "return failure or ignore failure",
|
|
891
1001
|
"default": "ignore"
|
|
892
1002
|
},
|
|
@@ -894,7 +1004,10 @@
|
|
|
894
1004
|
"type": "object",
|
|
895
1005
|
"description": "The json object with response fields of the call to getDevice",
|
|
896
1006
|
"additionalProperties": {
|
|
897
|
-
"type":
|
|
1007
|
+
"type": [
|
|
1008
|
+
"string",
|
|
1009
|
+
"number"
|
|
1010
|
+
]
|
|
898
1011
|
},
|
|
899
1012
|
"properties": {}
|
|
900
1013
|
},
|
|
@@ -907,7 +1020,10 @@
|
|
|
907
1020
|
"type": "object",
|
|
908
1021
|
"description": "The json object with response fields of the call to getDevice",
|
|
909
1022
|
"additionalProperties": {
|
|
910
|
-
"type":
|
|
1023
|
+
"type": [
|
|
1024
|
+
"string",
|
|
1025
|
+
"number"
|
|
1026
|
+
]
|
|
911
1027
|
},
|
|
912
1028
|
"properties": {
|
|
913
1029
|
"name": {
|
|
@@ -944,6 +1060,7 @@
|
|
|
944
1060
|
"type": "array",
|
|
945
1061
|
"description": "Broker call(s) to getDevicesFiltered",
|
|
946
1062
|
"items": {
|
|
1063
|
+
"type": "object",
|
|
947
1064
|
"properties": {
|
|
948
1065
|
"path": {
|
|
949
1066
|
"type": "string",
|
|
@@ -955,30 +1072,74 @@
|
|
|
955
1072
|
"description": "The method of the call to getDevicesFiltered",
|
|
956
1073
|
"default": "GET"
|
|
957
1074
|
},
|
|
1075
|
+
"pagination": {
|
|
1076
|
+
"type": "object",
|
|
1077
|
+
"description": "todo",
|
|
1078
|
+
"properties": {
|
|
1079
|
+
"offsetVar": {
|
|
1080
|
+
"type": "string",
|
|
1081
|
+
"description": "Name of variable that defines how to go to next set of results"
|
|
1082
|
+
},
|
|
1083
|
+
"limitVar": {
|
|
1084
|
+
"type": "string",
|
|
1085
|
+
"description": "Name of variable that defines the max results returned in a request"
|
|
1086
|
+
},
|
|
1087
|
+
"incrementBy": {
|
|
1088
|
+
"type": "string",
|
|
1089
|
+
"enum": [
|
|
1090
|
+
"limit",
|
|
1091
|
+
"page"
|
|
1092
|
+
],
|
|
1093
|
+
"description": "How to incremenet offset. Default limit",
|
|
1094
|
+
"default": "limit"
|
|
1095
|
+
},
|
|
1096
|
+
"requestLocation": {
|
|
1097
|
+
"type": "string",
|
|
1098
|
+
"enum": [
|
|
1099
|
+
"query",
|
|
1100
|
+
"body"
|
|
1101
|
+
],
|
|
1102
|
+
"description": "Where in request the pagination data goes",
|
|
1103
|
+
"default": "query"
|
|
1104
|
+
}
|
|
1105
|
+
}
|
|
1106
|
+
},
|
|
958
1107
|
"query": {
|
|
959
1108
|
"type": "object",
|
|
960
1109
|
"description": "The json object with query parameters of the call to getDevicesFiltered",
|
|
961
1110
|
"additionalProperties": {
|
|
962
|
-
"type":
|
|
1111
|
+
"type": [
|
|
1112
|
+
"string",
|
|
1113
|
+
"number"
|
|
1114
|
+
]
|
|
963
1115
|
}
|
|
964
1116
|
},
|
|
965
1117
|
"body": {
|
|
966
1118
|
"type": "object",
|
|
967
1119
|
"description": "The json object with body of the call to getDevicesFiltered",
|
|
968
1120
|
"additionalProperties": {
|
|
969
|
-
"type":
|
|
1121
|
+
"type": [
|
|
1122
|
+
"string",
|
|
1123
|
+
"number"
|
|
1124
|
+
]
|
|
970
1125
|
}
|
|
971
1126
|
},
|
|
972
1127
|
"headers": {
|
|
973
1128
|
"type": "object",
|
|
974
1129
|
"description": "The json object with headers of the call to getDevicesFiltered",
|
|
975
1130
|
"additionalProperties": {
|
|
976
|
-
"type":
|
|
1131
|
+
"type": [
|
|
1132
|
+
"string",
|
|
1133
|
+
"number"
|
|
1134
|
+
]
|
|
977
1135
|
}
|
|
978
1136
|
},
|
|
979
1137
|
"handleFailure": {
|
|
980
1138
|
"type": "string",
|
|
981
|
-
"enum": [
|
|
1139
|
+
"enum": [
|
|
1140
|
+
"ignore",
|
|
1141
|
+
"fail"
|
|
1142
|
+
],
|
|
982
1143
|
"description": "return failure or ignore failure",
|
|
983
1144
|
"default": "ignore"
|
|
984
1145
|
},
|
|
@@ -986,7 +1147,10 @@
|
|
|
986
1147
|
"type": "object",
|
|
987
1148
|
"description": "The json object with response fields of the call to getDevice",
|
|
988
1149
|
"additionalProperties": {
|
|
989
|
-
"type":
|
|
1150
|
+
"type": [
|
|
1151
|
+
"string",
|
|
1152
|
+
"number"
|
|
1153
|
+
]
|
|
990
1154
|
},
|
|
991
1155
|
"properties": {}
|
|
992
1156
|
},
|
|
@@ -999,7 +1163,10 @@
|
|
|
999
1163
|
"type": "object",
|
|
1000
1164
|
"description": "The json object with response fields of the call to getDevicesFiltered",
|
|
1001
1165
|
"additionalProperties": {
|
|
1002
|
-
"type":
|
|
1166
|
+
"type": [
|
|
1167
|
+
"string",
|
|
1168
|
+
"number"
|
|
1169
|
+
]
|
|
1003
1170
|
},
|
|
1004
1171
|
"properties": {
|
|
1005
1172
|
"name": {
|
|
@@ -1036,6 +1203,7 @@
|
|
|
1036
1203
|
"type": "array",
|
|
1037
1204
|
"description": "Broker call(s) to determine if the device isAlive",
|
|
1038
1205
|
"items": {
|
|
1206
|
+
"type": "object",
|
|
1039
1207
|
"properties": {
|
|
1040
1208
|
"path": {
|
|
1041
1209
|
"type": "string",
|
|
@@ -1051,26 +1219,38 @@
|
|
|
1051
1219
|
"type": "object",
|
|
1052
1220
|
"description": "The json object with query parameters of the call to isAlive",
|
|
1053
1221
|
"additionalProperties": {
|
|
1054
|
-
"type":
|
|
1222
|
+
"type": [
|
|
1223
|
+
"string",
|
|
1224
|
+
"number"
|
|
1225
|
+
]
|
|
1055
1226
|
}
|
|
1056
1227
|
},
|
|
1057
1228
|
"body": {
|
|
1058
1229
|
"type": "object",
|
|
1059
1230
|
"description": "The json object with body of the call to isAlive",
|
|
1060
1231
|
"additionalProperties": {
|
|
1061
|
-
"type":
|
|
1232
|
+
"type": [
|
|
1233
|
+
"string",
|
|
1234
|
+
"number"
|
|
1235
|
+
]
|
|
1062
1236
|
}
|
|
1063
1237
|
},
|
|
1064
1238
|
"headers": {
|
|
1065
1239
|
"type": "object",
|
|
1066
1240
|
"description": "The json object with headers of the call to isAlive",
|
|
1067
1241
|
"additionalProperties": {
|
|
1068
|
-
"type":
|
|
1242
|
+
"type": [
|
|
1243
|
+
"string",
|
|
1244
|
+
"number"
|
|
1245
|
+
]
|
|
1069
1246
|
}
|
|
1070
1247
|
},
|
|
1071
1248
|
"handleFailure": {
|
|
1072
1249
|
"type": "string",
|
|
1073
|
-
"enum": [
|
|
1250
|
+
"enum": [
|
|
1251
|
+
"ignore",
|
|
1252
|
+
"fail"
|
|
1253
|
+
],
|
|
1074
1254
|
"description": "return failure or ignore isAlive",
|
|
1075
1255
|
"default": "ignore"
|
|
1076
1256
|
},
|
|
@@ -1078,7 +1258,10 @@
|
|
|
1078
1258
|
"type": "object",
|
|
1079
1259
|
"description": "The json object with response fields of the call to getDevice",
|
|
1080
1260
|
"additionalProperties": {
|
|
1081
|
-
"type":
|
|
1261
|
+
"type": [
|
|
1262
|
+
"string",
|
|
1263
|
+
"number"
|
|
1264
|
+
]
|
|
1082
1265
|
},
|
|
1083
1266
|
"properties": {}
|
|
1084
1267
|
},
|
|
@@ -1091,7 +1274,10 @@
|
|
|
1091
1274
|
"type": "object",
|
|
1092
1275
|
"description": "The json object with response fields of the call to isAlive",
|
|
1093
1276
|
"additionalProperties": {
|
|
1094
|
-
"type":
|
|
1277
|
+
"type": [
|
|
1278
|
+
"string",
|
|
1279
|
+
"number"
|
|
1280
|
+
]
|
|
1095
1281
|
},
|
|
1096
1282
|
"properties": {
|
|
1097
1283
|
"status": {
|
|
@@ -1113,6 +1299,7 @@
|
|
|
1113
1299
|
"type": "array",
|
|
1114
1300
|
"description": "Broker call(s) to getConfig",
|
|
1115
1301
|
"items": {
|
|
1302
|
+
"type": "object",
|
|
1116
1303
|
"properties": {
|
|
1117
1304
|
"path": {
|
|
1118
1305
|
"type": "string",
|
|
@@ -1128,26 +1315,38 @@
|
|
|
1128
1315
|
"type": "object",
|
|
1129
1316
|
"description": "The json object with query parameters of the call to getConfig",
|
|
1130
1317
|
"additionalProperties": {
|
|
1131
|
-
"type":
|
|
1318
|
+
"type": [
|
|
1319
|
+
"string",
|
|
1320
|
+
"number"
|
|
1321
|
+
]
|
|
1132
1322
|
}
|
|
1133
1323
|
},
|
|
1134
1324
|
"body": {
|
|
1135
1325
|
"type": "object",
|
|
1136
1326
|
"description": "The json object with body of the call to getConfig",
|
|
1137
1327
|
"additionalProperties": {
|
|
1138
|
-
"type":
|
|
1328
|
+
"type": [
|
|
1329
|
+
"string",
|
|
1330
|
+
"number"
|
|
1331
|
+
]
|
|
1139
1332
|
}
|
|
1140
1333
|
},
|
|
1141
1334
|
"headers": {
|
|
1142
1335
|
"type": "object",
|
|
1143
1336
|
"description": "The json object with headers of the call to getConfig",
|
|
1144
1337
|
"additionalProperties": {
|
|
1145
|
-
"type":
|
|
1338
|
+
"type": [
|
|
1339
|
+
"string",
|
|
1340
|
+
"number"
|
|
1341
|
+
]
|
|
1146
1342
|
}
|
|
1147
1343
|
},
|
|
1148
1344
|
"handleFailure": {
|
|
1149
1345
|
"type": "string",
|
|
1150
|
-
"enum": [
|
|
1346
|
+
"enum": [
|
|
1347
|
+
"ignore",
|
|
1348
|
+
"fail"
|
|
1349
|
+
],
|
|
1151
1350
|
"description": "return failure or ignore getConfig",
|
|
1152
1351
|
"default": "ignore"
|
|
1153
1352
|
},
|
|
@@ -1155,7 +1354,10 @@
|
|
|
1155
1354
|
"type": "object",
|
|
1156
1355
|
"description": "The json object with response fields of the call to getDevice",
|
|
1157
1356
|
"additionalProperties": {
|
|
1158
|
-
"type":
|
|
1357
|
+
"type": [
|
|
1358
|
+
"string",
|
|
1359
|
+
"number"
|
|
1360
|
+
]
|
|
1159
1361
|
},
|
|
1160
1362
|
"properties": {}
|
|
1161
1363
|
},
|
|
@@ -1168,10 +1370,12 @@
|
|
|
1168
1370
|
"type": "object",
|
|
1169
1371
|
"description": "The json object with response fields of the call to getConfig",
|
|
1170
1372
|
"additionalProperties": {
|
|
1171
|
-
"type":
|
|
1373
|
+
"type": [
|
|
1374
|
+
"string",
|
|
1375
|
+
"number"
|
|
1376
|
+
]
|
|
1172
1377
|
},
|
|
1173
|
-
"properties": {
|
|
1174
|
-
}
|
|
1378
|
+
"properties": {}
|
|
1175
1379
|
}
|
|
1176
1380
|
}
|
|
1177
1381
|
}
|
|
@@ -1180,6 +1384,7 @@
|
|
|
1180
1384
|
"type": "array",
|
|
1181
1385
|
"description": "Broker call(s) to getCount",
|
|
1182
1386
|
"items": {
|
|
1387
|
+
"type": "object",
|
|
1183
1388
|
"properties": {
|
|
1184
1389
|
"path": {
|
|
1185
1390
|
"type": "string",
|
|
@@ -1195,26 +1400,38 @@
|
|
|
1195
1400
|
"type": "object",
|
|
1196
1401
|
"description": "The json object with query parameters of the call to getCount",
|
|
1197
1402
|
"additionalProperties": {
|
|
1198
|
-
"type":
|
|
1403
|
+
"type": [
|
|
1404
|
+
"string",
|
|
1405
|
+
"number"
|
|
1406
|
+
]
|
|
1199
1407
|
}
|
|
1200
1408
|
},
|
|
1201
1409
|
"body": {
|
|
1202
1410
|
"type": "object",
|
|
1203
1411
|
"description": "The json object with body of the call to getCount",
|
|
1204
1412
|
"additionalProperties": {
|
|
1205
|
-
"type":
|
|
1413
|
+
"type": [
|
|
1414
|
+
"string",
|
|
1415
|
+
"number"
|
|
1416
|
+
]
|
|
1206
1417
|
}
|
|
1207
1418
|
},
|
|
1208
1419
|
"headers": {
|
|
1209
1420
|
"type": "object",
|
|
1210
1421
|
"description": "The json object with headers of the call to getCount",
|
|
1211
1422
|
"additionalProperties": {
|
|
1212
|
-
"type":
|
|
1423
|
+
"type": [
|
|
1424
|
+
"string",
|
|
1425
|
+
"number"
|
|
1426
|
+
]
|
|
1213
1427
|
}
|
|
1214
1428
|
},
|
|
1215
1429
|
"handleFailure": {
|
|
1216
1430
|
"type": "string",
|
|
1217
|
-
"enum": [
|
|
1431
|
+
"enum": [
|
|
1432
|
+
"ignore",
|
|
1433
|
+
"fail"
|
|
1434
|
+
],
|
|
1218
1435
|
"description": "return failure or ignore getCount",
|
|
1219
1436
|
"default": "ignore"
|
|
1220
1437
|
},
|
|
@@ -1222,7 +1439,10 @@
|
|
|
1222
1439
|
"type": "object",
|
|
1223
1440
|
"description": "The json object with response fields of the call to getDevice",
|
|
1224
1441
|
"additionalProperties": {
|
|
1225
|
-
"type":
|
|
1442
|
+
"type": [
|
|
1443
|
+
"string",
|
|
1444
|
+
"number"
|
|
1445
|
+
]
|
|
1226
1446
|
},
|
|
1227
1447
|
"properties": {}
|
|
1228
1448
|
},
|
|
@@ -1235,9 +1455,201 @@
|
|
|
1235
1455
|
"type": "object",
|
|
1236
1456
|
"description": "The json object with response fields of the call to getConfig",
|
|
1237
1457
|
"additionalProperties": {
|
|
1238
|
-
"type":
|
|
1458
|
+
"type": [
|
|
1459
|
+
"string",
|
|
1460
|
+
"number"
|
|
1461
|
+
]
|
|
1239
1462
|
},
|
|
1240
|
-
"properties": {
|
|
1463
|
+
"properties": {}
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
}
|
|
1469
|
+
},
|
|
1470
|
+
"cache": {
|
|
1471
|
+
"type": "object",
|
|
1472
|
+
"properties": {
|
|
1473
|
+
"enabled": {
|
|
1474
|
+
"type": "boolean",
|
|
1475
|
+
"description": "Whether or not cache is enabled for adapter",
|
|
1476
|
+
"default": false
|
|
1477
|
+
},
|
|
1478
|
+
"entities": {
|
|
1479
|
+
"type": "array",
|
|
1480
|
+
"description": "Information for the cached entities",
|
|
1481
|
+
"items": {
|
|
1482
|
+
"type": "object",
|
|
1483
|
+
"properties": {
|
|
1484
|
+
"entityType": {
|
|
1485
|
+
"type": "string",
|
|
1486
|
+
"description": "The name of the entity - should match adapter entity configuration or a broker (e.g. Device)",
|
|
1487
|
+
"default": ""
|
|
1488
|
+
},
|
|
1489
|
+
"frequency": {
|
|
1490
|
+
"type": "integer",
|
|
1491
|
+
"description": "how long (in minutes) we wait to re-populate the cache",
|
|
1492
|
+
"default": 1440,
|
|
1493
|
+
"maximum": 10080
|
|
1494
|
+
},
|
|
1495
|
+
"flushOnFail": {
|
|
1496
|
+
"type": "boolean",
|
|
1497
|
+
"description": "Whether to clear the cache we have if the populate failed",
|
|
1498
|
+
"default": false
|
|
1499
|
+
},
|
|
1500
|
+
"limit": {
|
|
1501
|
+
"type": "integer",
|
|
1502
|
+
"description": "maximum number of items to keep in cache",
|
|
1503
|
+
"default": 1000
|
|
1504
|
+
},
|
|
1505
|
+
"retryAttempts": {
|
|
1506
|
+
"type": "integer",
|
|
1507
|
+
"description": "number of times to retry the populate call before failure",
|
|
1508
|
+
"default": 5
|
|
1509
|
+
},
|
|
1510
|
+
"sort": {
|
|
1511
|
+
"type": "boolean",
|
|
1512
|
+
"description": "whether to sort the data or not",
|
|
1513
|
+
"default": true
|
|
1514
|
+
},
|
|
1515
|
+
"populate": {
|
|
1516
|
+
"type": "array",
|
|
1517
|
+
"description": "Information for the call(s) used to populate the cache",
|
|
1518
|
+
"items": {
|
|
1519
|
+
"type": "object",
|
|
1520
|
+
"properties": {
|
|
1521
|
+
"path": {
|
|
1522
|
+
"type": "string",
|
|
1523
|
+
"description": "The fully qualified path of the call to getDevice (e.g. /rest/api/device/{deviceid})",
|
|
1524
|
+
"default": ""
|
|
1525
|
+
},
|
|
1526
|
+
"method": {
|
|
1527
|
+
"type": "string",
|
|
1528
|
+
"description": "The method of the call to getDevice",
|
|
1529
|
+
"default": "GET"
|
|
1530
|
+
},
|
|
1531
|
+
"pagination": {
|
|
1532
|
+
"type": "object",
|
|
1533
|
+
"description": "todo",
|
|
1534
|
+
"properties": {
|
|
1535
|
+
"offsetVar": {
|
|
1536
|
+
"type": "string",
|
|
1537
|
+
"description": "Name of variable that defines how to go to next set of results"
|
|
1538
|
+
},
|
|
1539
|
+
"limitVar": {
|
|
1540
|
+
"type": "string",
|
|
1541
|
+
"description": "Name of variable that defines the max results returned in a request"
|
|
1542
|
+
},
|
|
1543
|
+
"incrementBy": {
|
|
1544
|
+
"type": "string",
|
|
1545
|
+
"enum": [
|
|
1546
|
+
"limit",
|
|
1547
|
+
"page"
|
|
1548
|
+
],
|
|
1549
|
+
"description": "How to incremenet offset. Default limit",
|
|
1550
|
+
"default": "limit"
|
|
1551
|
+
},
|
|
1552
|
+
"requestLocation": {
|
|
1553
|
+
"type": "string",
|
|
1554
|
+
"enum": [
|
|
1555
|
+
"query",
|
|
1556
|
+
"body"
|
|
1557
|
+
],
|
|
1558
|
+
"description": "Where in request the pagination data goes",
|
|
1559
|
+
"default": "query"
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
},
|
|
1563
|
+
"query": {
|
|
1564
|
+
"type": "object",
|
|
1565
|
+
"description": "The json object with query parameters of the call to getDevice",
|
|
1566
|
+
"additionalProperties": {
|
|
1567
|
+
"type": [
|
|
1568
|
+
"string",
|
|
1569
|
+
"number"
|
|
1570
|
+
]
|
|
1571
|
+
}
|
|
1572
|
+
},
|
|
1573
|
+
"body": {
|
|
1574
|
+
"type": "object",
|
|
1575
|
+
"description": "The json object with body of the call to getDevice",
|
|
1576
|
+
"additionalProperties": {
|
|
1577
|
+
"type": [
|
|
1578
|
+
"string",
|
|
1579
|
+
"number"
|
|
1580
|
+
]
|
|
1581
|
+
}
|
|
1582
|
+
},
|
|
1583
|
+
"headers": {
|
|
1584
|
+
"type": "object",
|
|
1585
|
+
"description": "The json object with headers of the call to getDevice",
|
|
1586
|
+
"additionalProperties": {
|
|
1587
|
+
"type": [
|
|
1588
|
+
"string",
|
|
1589
|
+
"number"
|
|
1590
|
+
]
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
"handleFailure": {
|
|
1594
|
+
"type": "string",
|
|
1595
|
+
"enum": [
|
|
1596
|
+
"ignore",
|
|
1597
|
+
"fail"
|
|
1598
|
+
],
|
|
1599
|
+
"description": "return failure or ignore failure",
|
|
1600
|
+
"default": "ignore"
|
|
1601
|
+
},
|
|
1602
|
+
"requestFields": {
|
|
1603
|
+
"type": "object",
|
|
1604
|
+
"description": "The json object with response fields of the call to getDevice",
|
|
1605
|
+
"additionalProperties": {
|
|
1606
|
+
"type": [
|
|
1607
|
+
"string",
|
|
1608
|
+
"number"
|
|
1609
|
+
]
|
|
1610
|
+
},
|
|
1611
|
+
"properties": {}
|
|
1612
|
+
},
|
|
1613
|
+
"responseDatakey": {
|
|
1614
|
+
"type": "string",
|
|
1615
|
+
"description": "place in the response where the data is - supports jsonquery",
|
|
1616
|
+
"default": ""
|
|
1617
|
+
},
|
|
1618
|
+
"responseFields": {
|
|
1619
|
+
"type": "object",
|
|
1620
|
+
"description": "The json object with response fields of the call to getDevice",
|
|
1621
|
+
"additionalProperties": {
|
|
1622
|
+
"type": [
|
|
1623
|
+
"string",
|
|
1624
|
+
"number"
|
|
1625
|
+
]
|
|
1626
|
+
}
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
},
|
|
1631
|
+
"cachedTasks": {
|
|
1632
|
+
"type": "array",
|
|
1633
|
+
"description": "Information for the call(s) used to populate the cache",
|
|
1634
|
+
"items": {
|
|
1635
|
+
"type": "object",
|
|
1636
|
+
"properties": {
|
|
1637
|
+
"name": {
|
|
1638
|
+
"type": "string",
|
|
1639
|
+
"description": "the name of the task/action that should utilize cached information",
|
|
1640
|
+
"default": ""
|
|
1641
|
+
},
|
|
1642
|
+
"filterField": {
|
|
1643
|
+
"type": "string",
|
|
1644
|
+
"description": "the field that contains filter information for this call",
|
|
1645
|
+
"default": ""
|
|
1646
|
+
},
|
|
1647
|
+
"filterLoc": {
|
|
1648
|
+
"type": "string",
|
|
1649
|
+
"description": "the field that contains the location of the filter field",
|
|
1650
|
+
"default": ""
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1241
1653
|
}
|
|
1242
1654
|
}
|
|
1243
1655
|
}
|
|
@@ -1246,4 +1658,4 @@
|
|
|
1246
1658
|
}
|
|
1247
1659
|
}
|
|
1248
1660
|
}
|
|
1249
|
-
}
|
|
1661
|
+
}
|