@itentialopensource/adapter-utils 5.9.4 → 5.10.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/CHANGELOG.md CHANGED
@@ -1,4 +1,20 @@
1
1
 
2
+ ## 5.10.0 [11-15-2024]
3
+
4
+ * query without keys
5
+
6
+ See merge request itentialopensource/adapter-utils!310
7
+
8
+ ---
9
+
10
+ ## 5.9.5 [11-06-2024]
11
+
12
+ * more role chain changes for AWS
13
+
14
+ See merge request itentialopensource/adapter-utils!309
15
+
16
+ ---
17
+
2
18
  ## 5.9.4 [10-14-2024]
3
19
 
4
20
  * Fix ssl conditional
@@ -45,6 +45,115 @@ class AuthenticationHandler {
45
45
  }
46
46
  }
47
47
 
48
+ /**
49
+ * @summary Assume an AWS STS Role
50
+ *
51
+ * @function assumeAWSSTSRole
52
+ * @param {object} [options] - the AWS options
53
+ * @param {object} [stsParams] - STS Parameters to use for authentication.
54
+ *
55
+ * @return {Object} the headers to add to the request
56
+ */
57
+ assumeAWSSTSRole(accessKey, secretKey, sessionT, options, STSParams, provideSign, callback) {
58
+ const meth = 'authenticationHandler-assumeAWSRole';
59
+ const origin = `${this.myid}-${meth}`;
60
+ log.trace(origin);
61
+
62
+ try {
63
+ // set up the config object
64
+ const configObj = {
65
+ sessionToken: this.allProps.authentication.aws_session_token,
66
+ accessKeyId: this.allProps.authentication.aws_access_key,
67
+ secretAccessKey: this.allProps.authentication.aws_secret_key,
68
+ region: options.region
69
+ };
70
+ // override the adapter config (ex. IAM and then Assume Role)
71
+ if (accessKey) {
72
+ configObj.accessKeyId = accessKey;
73
+ }
74
+ if (secretKey) {
75
+ configObj.secretAccessKey = secretKey;
76
+ }
77
+ if (sessionT) {
78
+ configObj.sessionToken = sessionT;
79
+ }
80
+ // Add optional config items (ssl, endpoint, proxy)
81
+ if (this.allProps.authentication.aws_sts) {
82
+ if (this.allProps.authentication.aws_sts.sslEnable === false) {
83
+ configObj.sslEnabled = false;
84
+ }
85
+ if (this.allProps.authentication.aws_sts.endpoint) {
86
+ configObj.endpoint = this.allProps.authentication.aws_sts.endpoint;
87
+ }
88
+ if (this.allProps.authentication.aws_sts.region) {
89
+ configObj.region = this.allProps.authentication.aws_sts.region;
90
+ }
91
+ if (this.allProps.authentication.aws_sts.proxy) {
92
+ configObj.httpOptions = {
93
+ proxy: this.allProps.authentication.aws_sts.proxy
94
+ };
95
+
96
+ if (this.allProps.authentication.aws_sts.proxyagent) {
97
+ configObj.httpOptions.agent = this.allProps.authentication.aws_sts.proxyagent;
98
+ }
99
+ }
100
+ }
101
+ // set the original AWS access information (from properties)
102
+ AWS.config.update(configObj);
103
+ const sts = new AWS.STS();
104
+ log.debug(`STS OPTIONS: ${JSON.stringify(configObj)}`);
105
+
106
+ // use STS to get the AWS access information for the user defined in STWS Params
107
+ const stsData = {
108
+ RoleArn: STSParams.RoleArn,
109
+ RoleSessionName: STSParams.RoleSessionName,
110
+ DurationSeconds: 3600
111
+ };
112
+ if (this.allProps.authentication.aws_sts && this.allProps.authentication.aws_sts.externalId) {
113
+ stsData.ExternalId = this.allProps.authentication.aws_sts.externalId;
114
+ }
115
+ if (STSParams.ExternalId) {
116
+ stsData.ExternalId = STSParams.ExternalId;
117
+ }
118
+
119
+ return sts.assumeRole(stsData, (err, data) => {
120
+ if (err) {
121
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, `AWS Assume Role Error ${err}`, null, null, null, null);
122
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
123
+ return callback(null, errorObj);
124
+ }
125
+ if (!data || !data.Credentials || !data.Credentials.AccessKeyId || !data.Credentials.SecretAccessKey) {
126
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, 'AWS Assume Role did not return credentials', null, null, null, null);
127
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
128
+ return callback(null, errorObj);
129
+ }
130
+
131
+ // if not providing a signature
132
+ if (!provideSign) {
133
+ return callback(data);
134
+ }
135
+
136
+ // extract the user specific info from the response
137
+ const accessKeyId = data.Credentials.AccessKeyId;
138
+ const secretAccessKey = data.Credentials.SecretAccessKey;
139
+ const sessionToken = data.Credentials.SessionToken;
140
+
141
+ // call the signature with the user specific information
142
+ const authOpts = aws4.sign(options, { accessKeyId, secretAccessKey, sessionToken });
143
+ if (sessionToken) {
144
+ authOpts.headers['X-Amz-Security-Token'] = sessionToken;
145
+ }
146
+
147
+ // return the headers
148
+ return callback(authOpts.headers);
149
+ });
150
+ } catch (e) {
151
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, 'Caught Exception', null, null, null, e);
152
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
153
+ return callback(null, errorObj);
154
+ }
155
+ }
156
+
48
157
  /**
49
158
  * @summary Gets the hcma authorization for the call
50
159
  *
@@ -113,77 +222,19 @@ class AuthenticationHandler {
113
222
  }
114
223
  log.debug(`SIG OPTIONS: ${JSON.stringify(options)}`);
115
224
 
116
- /* STS AUTHENTICATION */
117
- if (STSParams) {
225
+ /* BASIC STS AUTHENTICATION */
226
+ // This will use the adapter role via the credentials provided to identify primary role and then assume the role
227
+ // provided in the STSParams. If no adapter role credentials are provided, it will use AWS Environment
228
+ // variables (access and secret key are null) and attempt to assume the role with those.
229
+ // If the role assumption is successful the call is signed with the assumed role. If it fails, the call will error.
230
+ if (STSParams && !roleName && !this.allProps.authentication.aws_iam_role) {
118
231
  log.info('Using STS for AWS Authentication');
119
-
120
- // set up the config object
121
- const configObj = {
122
- sessionToken: this.allProps.authentication.aws_session_token,
123
- accessKeyId: this.allProps.authentication.aws_access_key,
124
- secretAccessKey: this.allProps.authentication.aws_secret_key,
125
- region: options.region
126
- };
127
- // Add optional config items (ssl, endpoint, proxy)
128
- if (this.allProps.authentication.aws_sts) {
129
- if (this.allProps.authentication.aws_sts.sslEnable === false) {
130
- configObj.sslEnabled = false;
131
- }
132
- if (this.allProps.authentication.aws_sts.endpoint) {
133
- configObj.endpoint = this.allProps.authentication.aws_sts.endpoint;
134
- }
135
- if (this.allProps.authentication.aws_sts.region) {
136
- configObj.region = this.allProps.authentication.aws_sts.region;
137
- }
138
- if (this.allProps.authentication.aws_sts.proxy) {
139
- configObj.httpOptions = {
140
- proxy: this.allProps.authentication.aws_sts.proxy
141
- };
142
-
143
- if (this.allProps.authentication.aws_sts.proxyagent) {
144
- configObj.httpOptions.agent = this.allProps.authentication.aws_sts.proxyagent;
145
- }
146
- }
147
- }
148
- // set the original AWS access information (from properties)
149
- AWS.config.update(configObj);
150
- log.debug(`STS OPTIONS: ${JSON.stringify(configObj)}`);
151
-
152
- // use STS to get the AWS access information for the user defined in STWS Params
153
- const sts = new AWS.STS();
154
- const stsData = {
155
- RoleArn: STSParams.RoleArn,
156
- RoleSessionName: STSParams.RoleSessionName,
157
- DurationSeconds: 3600
158
- };
159
- return sts.assumeRole(stsData, (err, data) => {
160
- if (err) {
161
- const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, `AWS Assume Role Error ${err}`, null, null, null, null);
162
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
163
- return callback(null, errorObj);
164
- }
165
- if (!data || !data.Credentials || !data.Credentials.AccessKeyId || !data.Credentials.SecretAccessKey) {
166
- const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, 'AWS Assume Role did not return credentials', null, null, null, null);
167
- log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
168
- return callback(null, errorObj);
169
- }
170
- // extract the user specific info from the response
171
- const accessKeyId = data.Credentials.AccessKeyId;
172
- const secretAccessKey = data.Credentials.SecretAccessKey;
173
- const sessionToken = data.Credentials.SessionToken;
174
-
175
- // call the signature with the user specific information
176
- const authOpts = aws4.sign(options, { accessKeyId, secretAccessKey, sessionToken });
177
- if (sessionToken) {
178
- authOpts.headers['X-Amz-Security-Token'] = sessionToken;
179
- }
180
-
181
- // return the headers
182
- return callback(authOpts.headers);
183
- });
232
+ return this.assumeAWSSTSRole(null, null, null, options, STSParams, true, callback);
184
233
  }
185
234
 
186
235
  /* ADAPTER PROPERTIES AUTHENTICATION */
236
+ // This will use the adapter role via the credentials provided to sign the call. If no adapter role credentials
237
+ // are provided, it will use AWS Environment variables (access and secret key are null) to sign the call.
187
238
  if (!roleName && !this.allProps.authentication.aws_iam_role) {
188
239
  log.info('Using Adapter PROPERTIES for AWS Authentication');
189
240
 
@@ -198,16 +249,26 @@ class AuthenticationHandler {
198
249
  }
199
250
 
200
251
  /* ROLE NAME AUTHENTICATION */
252
+ // Different scenarios to discuss here
253
+ // 1. IAM to internal AWS Server - either Task Role (roleName) or Adapter Role (aws_iam_role)
254
+ // 2. Adapter Role (aws_iam_role) assumes Task Role (STSParams or roleName)
255
+ // a. IAM to internal AWS Server for Adapter Role
256
+ // b. AWS STS for assuming Task Role(s) using Adapter Role
257
+ // 3. Pod Role assumes Adapter Role (aws_iam_role) assumes Task Role (STSParams, RoleName)
258
+ // a. AWS STS for assuming Adapter Role using AWS Environment (Pod Role)
259
+ // b. AWS STS for assuming Task Role(s) using Adapter Role
201
260
  log.info('Using roleName for AWS Authentication');
202
261
 
203
- // determine where to get roleName (task is higher priority)
262
+ // get the role to use for first credential call
204
263
  let myRole = roleName;
205
- if (!roleName) {
264
+ if (this.allProps.authentication.aws_iam_role) {
206
265
  myRole = this.allProps.authentication.aws_iam_role;
207
266
  }
267
+
268
+ // set up data for first assume role call
269
+ const stsrole = new AWS.STS();
208
270
  const myDate = new Date().getTime();
209
271
  const mySess = `${this.myid}-${myDate}`;
210
- const sts = new AWS.STS();
211
272
  const stsData = {
212
273
  RoleArn: myRole,
213
274
  RoleSessionName: mySess,
@@ -215,7 +276,7 @@ class AuthenticationHandler {
215
276
  };
216
277
 
217
278
  // change role to the role name provided
218
- return sts.assumeRole(stsData, (err, data) => {
279
+ return stsrole.assumeRole(stsData, (err, data) => {
219
280
  if (err) {
220
281
  const errorObj = this.requestHandlerInst.formatErrorObject(this.myid, meth, `AWS Assume Role Error ${err}`, null, null, null, null);
221
282
  log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
@@ -232,6 +293,17 @@ class AuthenticationHandler {
232
293
  const secretAccessKey = data.Credentials.SecretAccessKey;
233
294
  const sessionToken = data.Credentials.SessionToken;
234
295
 
296
+ /* ASSUMING TASK ROLE */
297
+ if (roleName && this.allProps.authentication.aws_iam_role) {
298
+ stsData.RoleArn = roleName;
299
+ log.info('Assuming Task Role after Adapter Role');
300
+ return this.assumeAWSSTSRole(accessKeyId, secretAccessKey, sessionToken, options, stsData, true, callback);
301
+ }
302
+ if (STSParams) {
303
+ log.info('Assuming Task Role (STS) after Adapter Role');
304
+ return this.assumeAWSSTSRole(accessKeyId, secretAccessKey, sessionToken, options, STSParams, true, callback);
305
+ }
306
+
235
307
  // sign the request
236
308
  const authOpts = aws4.sign(options, { accessKeyId, secretAccessKey, sessionToken });
237
309
  if (sessionToken) {
@@ -23,6 +23,7 @@ let globalRequestGl = null;
23
23
  let returnRawGl = false;
24
24
  let encodePath = true;
25
25
  let encodeUri = true;
26
+ let queryKeyGl = true;
26
27
  let stripEscapes = false;
27
28
  let returnResponseHeaders = true;
28
29
  let healthcheckHeaders = null;
@@ -797,12 +798,20 @@ function buildRequestPath(entity, action, entitySchema, reqPath, uriPathVars, ur
797
798
  addquery = entitySchema.querykey;
798
799
  }
799
800
  if (systemQuery !== null) {
801
+ // do not want to change the global only change this call so use a local var
802
+ let localEncode = encodeUri;
803
+ let localKey = queryKeyGl;
804
+
800
805
  // if encoding is changed in call properties that overrides the default
801
806
  if (callProperties && Object.hasOwnProperty.call(callProperties, 'encode_queryvars')) {
802
- encodeUri = callProperties.encode_queryvars;
807
+ localEncode = callProperties.encode_queryvars;
808
+ }
809
+ if (callProperties && Object.hasOwnProperty.call(callProperties, 'query_keys')) {
810
+ localKey = callProperties.query_keys;
803
811
  }
804
- // if we are encoding - use querystring since it does it all!
805
- if (encodeUri === true) {
812
+
813
+ // if we are encoding with keys - use querystring since it does it all!
814
+ if (localEncode === true && localKey === true) {
806
815
  addquery += querystring.stringify(systemQuery);
807
816
  } else {
808
817
  // if not encoding we need to build
@@ -814,8 +823,17 @@ function buildRequestPath(entity, action, entitySchema, reqPath, uriPathVars, ur
814
823
  if (k > 0) {
815
824
  addquery += '&';
816
825
  }
817
- // adds key=value
818
- addquery += `${qkeys[k]}=${systemQuery[qkeys[k]]}`;
826
+
827
+ if (localKey === true) {
828
+ // adds key=value
829
+ addquery += `${qkeys[k]}=${systemQuery[qkeys[k]]}`;
830
+ } else if (localEncode === true) {
831
+ // adds value but encoded
832
+ addquery += encodeURIComponent(systemQuery[qkeys[k]]);
833
+ } else {
834
+ // adds value
835
+ addquery += `${systemQuery[qkeys[k]]}`;
836
+ }
819
837
  }
820
838
  }
821
839
  }
@@ -1147,6 +1165,11 @@ class RestHandler {
1147
1165
  encodePath = this.encode;
1148
1166
  this.encodeQ = properties.encode_queryvars;
1149
1167
  encodeUri = this.encodeQ;
1168
+ this.queryKey = true;
1169
+ if (Object.hasOwnProperty.call(properties, 'query_keys')) {
1170
+ this.queryKey = properties.query_keys;
1171
+ }
1172
+ queryKeyGl = this.queryKey;
1150
1173
 
1151
1174
  // optional to strip extra escapes - default is false
1152
1175
  if (properties.stripEscapes) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-utils",
3
- "version": "5.9.4",
3
+ "version": "5.10.0",
4
4
  "description": "Itential Adapter Utility Libraries",
5
5
  "scripts": {
6
6
  "postinstall": "node utils/setup.js",
Binary file
@@ -11,6 +11,14 @@
11
11
  "systemx.customer.com"
12
12
  ]
13
13
  },
14
+ "region": {
15
+ "type": "string",
16
+ "description": "region of the server",
17
+ "default": "",
18
+ "examples": [
19
+ "us-east-1"
20
+ ]
21
+ },
14
22
  "port": {
15
23
  "type": "integer",
16
24
  "description": "port on which to connect to the server",
@@ -61,6 +69,11 @@
61
69
  "description": "When true the query parameters are encoded in the url",
62
70
  "default": true
63
71
  },
72
+ "query_keys": {
73
+ "type": "boolean",
74
+ "description": "When true the query keys are put into the url (e.g. key=value)",
75
+ "default": true
76
+ },
64
77
  "save_metric": {
65
78
  "type": [
66
79
  "boolean",
@@ -290,7 +303,9 @@
290
303
  "description": "the protocol to request token from system",
291
304
  "default": "",
292
305
  "enum": [
293
- "http", "https", ""
306
+ "http",
307
+ "https",
308
+ ""
294
309
  ]
295
310
  },
296
311
  "host": {
@@ -339,6 +354,83 @@
339
354
  }
340
355
  }
341
356
  }
357
+ },
358
+ "aws_access_key": {
359
+ "type": "string",
360
+ "description": "AWS access key for authentication",
361
+ "default": "",
362
+ "examples": [
363
+ "accesskey"
364
+ ]
365
+ },
366
+ "aws_secret_key": {
367
+ "type": "string",
368
+ "description": "AWS secret key for authentication",
369
+ "default": "",
370
+ "examples": [
371
+ "secretkey"
372
+ ]
373
+ },
374
+ "aws_session_token": {
375
+ "type": "string",
376
+ "description": "AWS session token for all calls - not all systems require this",
377
+ "default": "",
378
+ "examples": [
379
+ "sessionToken"
380
+ ]
381
+ },
382
+ "aws_iam_role": {
383
+ "type": "string",
384
+ "description": "AWS IAM Role for all calls - not all systems require this",
385
+ "default": "",
386
+ "examples": [
387
+ "roleOnAllCalls"
388
+ ]
389
+ },
390
+ "aws_sts": {
391
+ "type": "object",
392
+ "properties": {
393
+ "region": {
394
+ "type": "string",
395
+ "description": "add a region to calls used for assume role",
396
+ "default": "",
397
+ "examples": [
398
+ "us-east-1"
399
+ ]
400
+ },
401
+ "sslEnable": {
402
+ "type": "boolean",
403
+ "description": "This can disable the ssl for the sts requests",
404
+ "default": true
405
+ },
406
+ "endpoint": {
407
+ "type": "string",
408
+ "description": "change the sts endpoint used for assume role",
409
+ "default": "",
410
+ "enum": [
411
+ "sts.amazonaws.com",
412
+ "sts.us-east-2.amazonaws.com",
413
+ ""
414
+ ]
415
+ },
416
+ "proxy": {
417
+ "type": "string",
418
+ "description": "add a proxy to calls used for assume role",
419
+ "default": "",
420
+ "examples": [
421
+ "https://1.1.1.1"
422
+ ]
423
+ },
424
+ "proxyagent": {
425
+ "type": "string",
426
+ "description": "define a proxy agent for calls to assume role",
427
+ "default": "",
428
+ "examples": [
429
+ "https",
430
+ "http"
431
+ ]
432
+ }
433
+ }
342
434
  }
343
435
  },
344
436
  "required": [
@@ -420,7 +512,7 @@
420
512
  "type": "integer",
421
513
  "description": "How often the healthcheck should run (in milliseconds).",
422
514
  "default": 300000,
423
- "minimum": 60000,
515
+ "minimum": 30000,
424
516
  "maximum": 3600000
425
517
  },
426
518
  "protocol": {
@@ -943,6 +1035,11 @@
943
1035
  "devicebroker": {
944
1036
  "type": "object",
945
1037
  "properties": {
1038
+ "enabled": {
1039
+ "type": "boolean",
1040
+ "description": "Whether or not the device broker calls have been mapped",
1041
+ "default": false
1042
+ },
946
1043
  "getDevice": {
947
1044
  "type": "array",
948
1045
  "description": "Broker call(s) to getDevice",
@@ -963,21 +1060,30 @@
963
1060
  "type": "object",
964
1061
  "description": "The json object with query parameters of the call to getDevice",
965
1062
  "additionalProperties": {
966
- "type": ["string", "number"]
1063
+ "type": [
1064
+ "string",
1065
+ "number"
1066
+ ]
967
1067
  }
968
1068
  },
969
1069
  "body": {
970
1070
  "type": "object",
971
1071
  "description": "The json object with body of the call to getDevice",
972
1072
  "additionalProperties": {
973
- "type": ["string", "number"]
1073
+ "type": [
1074
+ "string",
1075
+ "number"
1076
+ ]
974
1077
  }
975
1078
  },
976
1079
  "headers": {
977
1080
  "type": "object",
978
1081
  "description": "The json object with headers of the call to getDevice",
979
1082
  "additionalProperties": {
980
- "type": ["string", "number"]
1083
+ "type": [
1084
+ "string",
1085
+ "number"
1086
+ ]
981
1087
  }
982
1088
  },
983
1089
  "handleFailure": {
@@ -993,7 +1099,10 @@
993
1099
  "type": "object",
994
1100
  "description": "The json object with response fields of the call to getDevice",
995
1101
  "additionalProperties": {
996
- "type": ["string", "number"]
1102
+ "type": [
1103
+ "string",
1104
+ "number"
1105
+ ]
997
1106
  },
998
1107
  "properties": {}
999
1108
  },
@@ -1006,7 +1115,10 @@
1006
1115
  "type": "object",
1007
1116
  "description": "The json object with response fields of the call to getDevice",
1008
1117
  "additionalProperties": {
1009
- "type": ["string", "number"]
1118
+ "type": [
1119
+ "string",
1120
+ "number"
1121
+ ]
1010
1122
  },
1011
1123
  "properties": {
1012
1124
  "name": {
@@ -1091,21 +1203,30 @@
1091
1203
  "type": "object",
1092
1204
  "description": "The json object with query parameters of the call to getDevicesFiltered",
1093
1205
  "additionalProperties": {
1094
- "type": ["string", "number"]
1206
+ "type": [
1207
+ "string",
1208
+ "number"
1209
+ ]
1095
1210
  }
1096
1211
  },
1097
1212
  "body": {
1098
1213
  "type": "object",
1099
1214
  "description": "The json object with body of the call to getDevicesFiltered",
1100
1215
  "additionalProperties": {
1101
- "type": ["string", "number"]
1216
+ "type": [
1217
+ "string",
1218
+ "number"
1219
+ ]
1102
1220
  }
1103
1221
  },
1104
1222
  "headers": {
1105
1223
  "type": "object",
1106
1224
  "description": "The json object with headers of the call to getDevicesFiltered",
1107
1225
  "additionalProperties": {
1108
- "type": ["string", "number"]
1226
+ "type": [
1227
+ "string",
1228
+ "number"
1229
+ ]
1109
1230
  }
1110
1231
  },
1111
1232
  "handleFailure": {
@@ -1121,7 +1242,10 @@
1121
1242
  "type": "object",
1122
1243
  "description": "The json object with response fields of the call to getDevice",
1123
1244
  "additionalProperties": {
1124
- "type": ["string", "number"]
1245
+ "type": [
1246
+ "string",
1247
+ "number"
1248
+ ]
1125
1249
  },
1126
1250
  "properties": {}
1127
1251
  },
@@ -1134,7 +1258,10 @@
1134
1258
  "type": "object",
1135
1259
  "description": "The json object with response fields of the call to getDevicesFiltered",
1136
1260
  "additionalProperties": {
1137
- "type": ["string", "number"]
1261
+ "type": [
1262
+ "string",
1263
+ "number"
1264
+ ]
1138
1265
  },
1139
1266
  "properties": {
1140
1267
  "name": {
@@ -1187,21 +1314,30 @@
1187
1314
  "type": "object",
1188
1315
  "description": "The json object with query parameters of the call to isAlive",
1189
1316
  "additionalProperties": {
1190
- "type": ["string", "number"]
1317
+ "type": [
1318
+ "string",
1319
+ "number"
1320
+ ]
1191
1321
  }
1192
1322
  },
1193
1323
  "body": {
1194
1324
  "type": "object",
1195
1325
  "description": "The json object with body of the call to isAlive",
1196
1326
  "additionalProperties": {
1197
- "type": ["string", "number"]
1327
+ "type": [
1328
+ "string",
1329
+ "number"
1330
+ ]
1198
1331
  }
1199
1332
  },
1200
1333
  "headers": {
1201
1334
  "type": "object",
1202
1335
  "description": "The json object with headers of the call to isAlive",
1203
1336
  "additionalProperties": {
1204
- "type": ["string", "number"]
1337
+ "type": [
1338
+ "string",
1339
+ "number"
1340
+ ]
1205
1341
  }
1206
1342
  },
1207
1343
  "handleFailure": {
@@ -1217,7 +1353,10 @@
1217
1353
  "type": "object",
1218
1354
  "description": "The json object with response fields of the call to getDevice",
1219
1355
  "additionalProperties": {
1220
- "type": ["string", "number"]
1356
+ "type": [
1357
+ "string",
1358
+ "number"
1359
+ ]
1221
1360
  },
1222
1361
  "properties": {}
1223
1362
  },
@@ -1230,7 +1369,10 @@
1230
1369
  "type": "object",
1231
1370
  "description": "The json object with response fields of the call to isAlive",
1232
1371
  "additionalProperties": {
1233
- "type": ["string", "number"]
1372
+ "type": [
1373
+ "string",
1374
+ "number"
1375
+ ]
1234
1376
  },
1235
1377
  "properties": {
1236
1378
  "status": {
@@ -1268,21 +1410,30 @@
1268
1410
  "type": "object",
1269
1411
  "description": "The json object with query parameters of the call to getConfig",
1270
1412
  "additionalProperties": {
1271
- "type": ["string", "number"]
1413
+ "type": [
1414
+ "string",
1415
+ "number"
1416
+ ]
1272
1417
  }
1273
1418
  },
1274
1419
  "body": {
1275
1420
  "type": "object",
1276
1421
  "description": "The json object with body of the call to getConfig",
1277
1422
  "additionalProperties": {
1278
- "type": ["string", "number"]
1423
+ "type": [
1424
+ "string",
1425
+ "number"
1426
+ ]
1279
1427
  }
1280
1428
  },
1281
1429
  "headers": {
1282
1430
  "type": "object",
1283
1431
  "description": "The json object with headers of the call to getConfig",
1284
1432
  "additionalProperties": {
1285
- "type": ["string", "number"]
1433
+ "type": [
1434
+ "string",
1435
+ "number"
1436
+ ]
1286
1437
  }
1287
1438
  },
1288
1439
  "handleFailure": {
@@ -1298,7 +1449,10 @@
1298
1449
  "type": "object",
1299
1450
  "description": "The json object with response fields of the call to getDevice",
1300
1451
  "additionalProperties": {
1301
- "type": ["string", "number"]
1452
+ "type": [
1453
+ "string",
1454
+ "number"
1455
+ ]
1302
1456
  },
1303
1457
  "properties": {}
1304
1458
  },
@@ -1311,7 +1465,10 @@
1311
1465
  "type": "object",
1312
1466
  "description": "The json object with response fields of the call to getConfig",
1313
1467
  "additionalProperties": {
1314
- "type": ["string", "number"]
1468
+ "type": [
1469
+ "string",
1470
+ "number"
1471
+ ]
1315
1472
  },
1316
1473
  "properties": {}
1317
1474
  }
@@ -1338,21 +1495,30 @@
1338
1495
  "type": "object",
1339
1496
  "description": "The json object with query parameters of the call to getCount",
1340
1497
  "additionalProperties": {
1341
- "type": ["string", "number"]
1498
+ "type": [
1499
+ "string",
1500
+ "number"
1501
+ ]
1342
1502
  }
1343
1503
  },
1344
1504
  "body": {
1345
1505
  "type": "object",
1346
1506
  "description": "The json object with body of the call to getCount",
1347
1507
  "additionalProperties": {
1348
- "type": ["string", "number"]
1508
+ "type": [
1509
+ "string",
1510
+ "number"
1511
+ ]
1349
1512
  }
1350
1513
  },
1351
1514
  "headers": {
1352
1515
  "type": "object",
1353
1516
  "description": "The json object with headers of the call to getCount",
1354
1517
  "additionalProperties": {
1355
- "type": ["string", "number"]
1518
+ "type": [
1519
+ "string",
1520
+ "number"
1521
+ ]
1356
1522
  }
1357
1523
  },
1358
1524
  "handleFailure": {
@@ -1368,7 +1534,10 @@
1368
1534
  "type": "object",
1369
1535
  "description": "The json object with response fields of the call to getDevice",
1370
1536
  "additionalProperties": {
1371
- "type": ["string", "number"]
1537
+ "type": [
1538
+ "string",
1539
+ "number"
1540
+ ]
1372
1541
  },
1373
1542
  "properties": {}
1374
1543
  },
@@ -1381,7 +1550,10 @@
1381
1550
  "type": "object",
1382
1551
  "description": "The json object with response fields of the call to getConfig",
1383
1552
  "additionalProperties": {
1384
- "type": ["string", "number"]
1553
+ "type": [
1554
+ "string",
1555
+ "number"
1556
+ ]
1385
1557
  },
1386
1558
  "properties": {}
1387
1559
  }
@@ -1487,21 +1659,30 @@
1487
1659
  "type": "object",
1488
1660
  "description": "The json object with query parameters of the call to populate the cache",
1489
1661
  "additionalProperties": {
1490
- "type": ["string", "number"]
1662
+ "type": [
1663
+ "string",
1664
+ "number"
1665
+ ]
1491
1666
  }
1492
1667
  },
1493
1668
  "body": {
1494
1669
  "type": "object",
1495
1670
  "description": "The json object with body of the call to populate the cache",
1496
1671
  "additionalProperties": {
1497
- "type": ["string", "number"]
1672
+ "type": [
1673
+ "string",
1674
+ "number"
1675
+ ]
1498
1676
  }
1499
1677
  },
1500
1678
  "headers": {
1501
1679
  "type": "object",
1502
1680
  "description": "The json object with headers of the call to populate the cache",
1503
1681
  "additionalProperties": {
1504
- "type": ["string", "number"]
1682
+ "type": [
1683
+ "string",
1684
+ "number"
1685
+ ]
1505
1686
  }
1506
1687
  },
1507
1688
  "handleFailure": {
@@ -1517,7 +1698,10 @@
1517
1698
  "type": "object",
1518
1699
  "description": "The json object with response fields of the call to populate the cache",
1519
1700
  "additionalProperties": {
1520
- "type": ["string", "number"]
1701
+ "type": [
1702
+ "string",
1703
+ "number"
1704
+ ]
1521
1705
  },
1522
1706
  "properties": {}
1523
1707
  },
@@ -1530,7 +1714,10 @@
1530
1714
  "type": "object",
1531
1715
  "description": "The json object with response fields of the call to populate the cache",
1532
1716
  "additionalProperties": {
1533
- "type": ["string", "number"]
1717
+ "type": [
1718
+ "string",
1719
+ "number"
1720
+ ]
1534
1721
  }
1535
1722
  }
1536
1723
  }