MCPcopy Create free account
hub / github.com/SAP/ui5-project / validate

Method validate

lib/validation/validator.js:54–69  ·  view source on GitHub ↗
({config, project, yaml})

Source from the content-addressed store, hash-verified

52 }
53
54 async validate({config, project, yaml}) {
55 const fnValidate = await this._compileSchema();
56 const valid = fnValidate(config);
57 if (!valid) {
58 // Read errors/schema from fnValidate before lazy loading ValidationError module.
59 // Otherwise they might be cleared already.
60 const {errors, schema} = fnValidate;
61 const {default: ValidationError} = await import("./ValidationError.js");
62 throw new ValidationError({
63 errors,
64 schema,
65 project,
66 yaml
67 });
68 }
69 }
70
71 static async loadSchema(schemaPath) {
72 const filePath = schemaPath.replace("http://ui5.sap/schema/", "");

Callers 13

_validateFunction · 0.80
_validateAndSetDefaultsFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80
assertValidationFunction · 0.80

Calls 1

_compileSchemaMethod · 0.95

Tested by

no test coverage detected