@ondc/automation-mock-runner 1.3.38 → 1.3.40
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/dist/lib/configHelper.js
CHANGED
|
@@ -235,7 +235,8 @@ async function buildConfigFromFlowConfig(payloads, flowConfig, domain, version,
|
|
|
235
235
|
for (const step of flowConfig.sequence) {
|
|
236
236
|
const isFormStep = step.type === "HTML_FORM" ||
|
|
237
237
|
step.type === "DYNAMIC_FORM" ||
|
|
238
|
-
step.type === "FORM"
|
|
238
|
+
step.type === "FORM" ||
|
|
239
|
+
step.type === "HTML_FORM_MULTI";
|
|
239
240
|
let stepConfig;
|
|
240
241
|
if (isFormStep) {
|
|
241
242
|
// HTML_FORM is not yet fully implemented — fall back to dynamic_form default
|
|
@@ -42,20 +42,24 @@ function validateGoodConfig(config) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
if (id !== undefined && step.mock.inputs.oldInputs === undefined) {
|
|
45
|
-
if (sampleData === undefined || sampleData === null) {
|
|
46
|
-
|
|
47
|
-
}
|
|
45
|
+
// if (sampleData === undefined || sampleData === null) {
|
|
46
|
+
// errors.push(
|
|
47
|
+
// ` • ${label}: inputs.sampleData is required when inputs.id is set`,
|
|
48
|
+
// );
|
|
49
|
+
// }
|
|
48
50
|
if (jsonSchema === undefined || jsonSchema === null) {
|
|
49
51
|
errors.push(` • ${label}: inputs.jsonSchema is required when inputs.id is set`);
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
if (sampleData != null && jsonSchema != null) {
|
|
53
|
-
const validate = ajv.compile(jsonSchema);
|
|
54
|
-
if (!validate(sampleData) && validate.errors) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
// const validate = ajv.compile(jsonSchema);
|
|
56
|
+
// if (!validate(sampleData) && validate.errors) {
|
|
57
|
+
// validate.errors.forEach((e) => {
|
|
58
|
+
// errors.push(
|
|
59
|
+
// ` • ${label}: inputs.sampleData${e.instancePath} ${e.message}`,
|
|
60
|
+
// );
|
|
61
|
+
// });
|
|
62
|
+
// }
|
|
59
63
|
}
|
|
60
64
|
}
|
|
61
65
|
if (errors.length > 0) {
|