@izara_project/izara-core-library-service-schemas 1.0.109 → 1.0.110

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@izara_project/izara-core-library-service-schemas",
3
- "version": "1.0.109",
3
+ "version": "1.0.110",
4
4
  "description": "Schemas for the service and objects it controls",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1212,6 +1212,20 @@ async function validateLocalSchema(_izContext, schemasPath, serviceConfigPath) {
1212
1212
  validateStatus.referenceErrors.push(`Relationship:${relTagName} /links/${linkIdx} /from/objType > Not found objectSchema ${JSON.stringify(link.to.objType)} `);
1213
1213
  }
1214
1214
  }
1215
+
1216
+ if (fromObjectSchema.hasOwnProperty("generatedBy") || toObjectSchema.hasOwnProperty("generatedBy")) {
1217
+ if (fromObjectSchema.generatedBy === "searchResultGenerated" || toObjectSchema.generatedBy === "searchResultGenerated") {
1218
+ let storageResourceTagsLink = link.storageResourceTags
1219
+ for (const storageResourceTagLink of storageResourceTagsLink) {
1220
+ for (const storageDataDetail of relData.storageResources[storageResourceTagLink]) {
1221
+ if (storageDataDetail.storageType !== consts.STORAGE_TYPES.lambda) {
1222
+ validateStatus.status = false;
1223
+ validateStatus.validateErrors.push(`Relationship:${relTagName} storageResource with generateBy:searchResultGenerated must be lambda type`);
1224
+ }
1225
+ }
1226
+ }
1227
+ }
1228
+ }
1215
1229
  })
1216
1230
  )
1217
1231
  // validate duplicate link