dsd-constants-lib
Advanced tools
Comparing version 1.9.4 to 1.9.5
@@ -143,17 +143,23 @@ /** | ||
*/ | ||
static listAbsentParamsNames(methodItem, paramsObjectToCheck) { | ||
static listWrongParamsNames(methodItem, paramsObjectToCheck) { | ||
let names = TypesConvention.listParamsNames(methodItem); | ||
let absent = []; | ||
let wrong = { absent: [], redundant: [] }; | ||
if(names.mandatory.length == 0 && (!paramsObjectToCheck || Object.keys(paramsObjectToCheck).length === 0)) | ||
return absent; | ||
paramsObjectToCheck = paramsObjectToCheck || {}; | ||
let givenParamsNames = Object.keys(paramsObjectToCheck); | ||
names.mandatory.forEach(m => { | ||
if(!paramsObjectToCheck || paramsObjectToCheck[m] === undefined) { | ||
if(paramsObjectToCheck[m] === undefined) { | ||
let p = TypesConvention.findParamConventionByName(methodItem, m); | ||
absent.push({ name: m, description: TypesConvention.getParamDescription(p) }); | ||
wrong.absent.push({ name: m, description: TypesConvention.getParamDescription(p) }); | ||
} | ||
}); | ||
return absent; | ||
givenParamsNames.forEach(g => { | ||
if(!TypesConvention.findParamConventionByName(methodItem, g)) | ||
wrong.redundant.push({ name: g, description: "unsupported" }); | ||
}); | ||
return wrong; | ||
} | ||
@@ -160,0 +166,0 @@ |
@@ -150,4 +150,7 @@ /** | ||
{name: "getCustodiansForCommonLabelOffer", params: ["IC_licenseTypeCode", "A_buyerId", "I_dabId"], returns: "O_custodiansArrays"}, | ||
{name: "getCustodiansForLabelOffer", params: ["IC_licenseTypeCode", "A_buyerId", ["I_tagId", 0], ["I_dabId", 0]], returns: "O_custodiansArrays"}, | ||
{ deprecated: true, name: "offerSellOwnership", params: ["A_sellerId", "S_sellerPassword", "A_buyerId", "I_dabId", "I_minPrice"], returns: "B_"}, | ||
{ deprecated: true, name: "offerBuyOwnership", params: ["A_buyerId", "S_buyerPassword", "I_dabId", "I_maxPrice"], returns: "B_"}, | ||
{ deprecated: true, name: "offerBuyOwnership", params: ["A_buyerId", "S_buyerPassword", "I_dabId", "I_maxPrice"], returns: "B_"}, | ||
@@ -154,0 +157,0 @@ { deprecated: true, name: "approveOwnershipDeal", params: ["A_custodianId", "S_custodianPassword", "A_buyerId", "I_dabId"], returns: "B_"}, |
{ | ||
"name": "dsd-constants-lib", | ||
"version": "1.9.4", | ||
"version": "1.9.5", | ||
"dependencies": {}, | ||
"scripts": {} | ||
} |
52227
778