@onlineapps/service-wrapper 3.4.2 → 3.4.4
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 +12 -0
- package/package.json +4 -4
- package/src/SchemaValidator.js +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this package. Follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format and semantic versioning within the internal-monorepo convention (all biz-service consumers ship matching changes in the same session).
|
|
4
4
|
|
|
5
|
+
## [3.4.3] — 2026-08-17
|
|
6
|
+
|
|
7
|
+
**Ajv config: `allowUnionTypes: true`.**
|
|
8
|
+
|
|
9
|
+
Every biz `operations.json` in `api_biz/*` uses `type: [X, "null"]` union types for nullable fields — a widely-accepted JSON Schema idiom. Ajv `strict: true` without `allowUnionTypes` rejects them and blocks service boot at `SchemaValidator.precompile` with:
|
|
10
|
+
|
|
11
|
+
strict mode: use allowUnionTypes to allow union type keyword ...
|
|
12
|
+
|
|
13
|
+
3.4.3 keeps strict mode (still rejects unknown keywords etc.) but explicitly allows union types. No other behaviour change.
|
|
14
|
+
|
|
15
|
+
Discovered during Fáze F5 live-rollout: property, converter, ingest, meta all have nullable output-schema fields using unions. Blocked their boot after F3 bump. Fix here is server-side (validator config).
|
|
16
|
+
|
|
5
17
|
## [3.4.2] — 2026-08-17
|
|
6
18
|
|
|
7
19
|
**Hot-fix: dangling `serviceUrl` reference at line 2649** left by 3.4.1's guard-removal pass. `_ensureValidationProof` still passed `serviceUrl` to `ValidationOrchestrator` after the `const serviceUrl = ...` declaration was deleted. Result: every biz that force-recreated to 3.4.1 hit `Phase 0.2 Tier 1 Validation - FAILED: serviceUrl is not defined` and stalled.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/service-wrapper",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.4",
|
|
4
4
|
"description": "Thin orchestration layer for microservices - delegates all infrastructure concerns to specialized connectors",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"@onlineapps/conn-infra-mq": "1.1.70",
|
|
32
32
|
"@onlineapps/conn-infra-secrets": "1.0.0",
|
|
33
33
|
"@onlineapps/conn-orch-cookbook": "2.1.4",
|
|
34
|
-
"@onlineapps/conn-orch-orchestrator": "2.1.
|
|
34
|
+
"@onlineapps/conn-orch-orchestrator": "2.1.5",
|
|
35
35
|
"@onlineapps/conn-orch-registry": "1.2.2",
|
|
36
|
-
"@onlineapps/conn-orch-validator": "3.2
|
|
36
|
+
"@onlineapps/conn-orch-validator": "3.3.2",
|
|
37
37
|
"@onlineapps/infrastructure-tools": "1.2.4",
|
|
38
38
|
"@onlineapps/monitoring-core": "1.0.24",
|
|
39
39
|
"@onlineapps/runtime-config": "1.0.2",
|
|
40
|
-
"@onlineapps/service-common": "1.
|
|
40
|
+
"@onlineapps/service-common": "1.2.0",
|
|
41
41
|
"ajv": "8.17.1",
|
|
42
42
|
"ajv-formats": "3.0.1"
|
|
43
43
|
},
|
package/src/SchemaValidator.js
CHANGED
|
@@ -27,7 +27,16 @@ const { ValidationError } = require('./ErrorMapper');
|
|
|
27
27
|
function _buildDefaultAjv() {
|
|
28
28
|
const Ajv = require('ajv');
|
|
29
29
|
const addFormats = require('ajv-formats');
|
|
30
|
-
|
|
30
|
+
// allowUnionTypes: `type: [X, "null"]` is a widely-used JSON Schema idiom
|
|
31
|
+
// for nullable fields; every biz operations.json in api_biz/* uses it.
|
|
32
|
+
// Strict mode without this flag rejects union types outright and blocks
|
|
33
|
+
// service boot (SchemaValidator.precompile throws).
|
|
34
|
+
const ajv = new Ajv({
|
|
35
|
+
strict: true,
|
|
36
|
+
allowUnionTypes: true,
|
|
37
|
+
allErrors: true,
|
|
38
|
+
removeAdditional: false
|
|
39
|
+
});
|
|
31
40
|
addFormats(ajv);
|
|
32
41
|
return ajv;
|
|
33
42
|
}
|