@onlineapps/conn-orch-validator 3.2.1 → 3.2.2

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": "@onlineapps/conn-orch-validator",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Validation orchestrator for OA Drive microservices - coordinates validation across all layers (base, infra, orch, business)",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -410,9 +410,16 @@ class CookbookTestRunner {
410
410
  continue;
411
411
  }
412
412
 
413
- // Type check
413
+ // Type check — recognise arrays as 'array' (not 'object') and null as 'null'.
414
414
  if (expectation.type) {
415
- const actualType = typeof actualValue;
415
+ let actualType;
416
+ if (Array.isArray(actualValue)) {
417
+ actualType = 'array';
418
+ } else if (actualValue === null) {
419
+ actualType = 'null';
420
+ } else {
421
+ actualType = typeof actualValue;
422
+ }
416
423
  if (actualType !== expectation.type) {
417
424
  errors.push(`Field ${field}: expected type ${expectation.type}, got ${actualType}`);
418
425
  }