@onlineapps/conn-orch-validator 2.0.25 → 2.0.26
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 +1 -1
- package/src/CookbookTestRunner.js +3 -0
- package/src/ServiceValidator.js +5 -1
- package/src/config.js +3 -0
- package/test-orchestrator.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onlineapps/conn-orch-validator",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.26",
|
|
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
|
"scripts": {
|
|
@@ -158,12 +158,15 @@ class CookbookTestRunner {
|
|
|
158
158
|
const endpoint = await this.resolveOperation(step.service, step.operation);
|
|
159
159
|
|
|
160
160
|
// Build request
|
|
161
|
+
// Validation context: ALWAYS add x-validation-request header to indicate this is a validation probe.
|
|
162
|
+
// This allows services to return deterministic responses without accessing external resources.
|
|
161
163
|
const request = {
|
|
162
164
|
method: endpoint.method,
|
|
163
165
|
url: `${this.serviceUrl}${endpoint.path}`,
|
|
164
166
|
data: step.input,
|
|
165
167
|
timeout: testConfig.timeout || this.timeout,
|
|
166
168
|
headers: {
|
|
169
|
+
'x-validation-request': 'true',
|
|
167
170
|
...resolveHeaders(endpoint.headers),
|
|
168
171
|
...resolveHeaders(step.headers)
|
|
169
172
|
}
|
package/src/ServiceValidator.js
CHANGED
|
@@ -116,7 +116,11 @@ class ServiceValidator {
|
|
|
116
116
|
buildTestRequest(path, method, operation) {
|
|
117
117
|
const request = {
|
|
118
118
|
path,
|
|
119
|
-
headers: {
|
|
119
|
+
headers: {
|
|
120
|
+
// Validation context: ALWAYS add x-validation-request header to indicate this is a validation probe.
|
|
121
|
+
// This allows services to return deterministic responses without accessing external resources.
|
|
122
|
+
'x-validation-request': 'true'
|
|
123
|
+
},
|
|
120
124
|
query: {},
|
|
121
125
|
body: null
|
|
122
126
|
};
|
package/src/config.js
CHANGED
package/test-orchestrator.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Quick test of ValidationOrchestrator
|
|
6
6
|
*
|
|
7
7
|
* Usage: node test-orchestrator.js <serviceRoot>
|
|
8
|
-
* Example: node test-orchestrator.js
|
|
8
|
+
* Example: node test-orchestrator.js ../../../services/hello-service
|
|
9
9
|
*
|
|
10
10
|
* Loads service configuration from conn-config/config.json
|
|
11
11
|
*/
|