@itentialopensource/adapter-utils
Advanced tools
Comparing version 4.9.2 to 4.9.3
@@ -0,1 +1,8 @@ | ||
## 4.9.3 [07-29-2019] | ||
* add filter to response after field is found, based on respFilter in schema | ||
See merge request itentialopensource/adapter-utils!103 | ||
--- | ||
## 4.9.2 [07-26-2019] | ||
@@ -2,0 +9,0 @@ * fix for query path changes |
@@ -15,2 +15,3 @@ /* @copyright Itential, LLC 2018-9 */ | ||
const AjvCl = require('ajv'); | ||
const jsonQuery = require('json-query'); | ||
@@ -250,3 +251,7 @@ let id = null; | ||
if (fieldValue !== null) { | ||
returnObj[schemaKeys[k]] = fieldValue; | ||
if (field.respFilter) { | ||
returnObj[schemaKeys[k]] = jsonQuery(field.respFilter, { data: fieldValue }).value; | ||
} else { | ||
returnObj[schemaKeys[k]] = fieldValue; | ||
} | ||
} | ||
@@ -261,3 +266,7 @@ } | ||
if (fieldValue !== null) { | ||
returnObj[schemaKeys[k]] = fieldValue; | ||
if (field.respFilter) { | ||
returnObj[schemaKeys[k]] = jsonQuery(field.respFilter, { data: fieldValue }).value; | ||
} else { | ||
returnObj[schemaKeys[k]] = fieldValue; | ||
} | ||
} | ||
@@ -264,0 +273,0 @@ } |
{ | ||
"name": "@itentialopensource/adapter-utils", | ||
"version": "4.9.2", | ||
"version": "4.9.3", | ||
"description": "Itential Adapter Utility Libraries", | ||
@@ -5,0 +5,0 @@ "scripts": { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1120889
10054