This commit is contained in:
Amar Zavery 2017-02-21 18:42:29 -08:00
Родитель 46c75129be
Коммит 56d7039cc4
2 изменённых файлов: 16 добавлений и 1 удалений

Просмотреть файл

@ -75,6 +75,20 @@ class SpecValidator {
});
}
getProviderNamespace() {
let result = null;
let re = /^(.*)\/providers\/(\w+\.\w+)\/(.*)$/ig;
if (this.specInJson) {
if (this.specInJson.paths) {
result = Object.keys(this.specInJson.paths).find(function(path) {
let prov = re.exec(path)[2];
if (prov) return prov;
return;
});
}
}
return result;
}
/*
* Updates the validityStatus of the internal specValidationResult based on the provided value.
*

Просмотреть файл

@ -22,10 +22,11 @@ class ValidationResponse {
*
* @return {object} An instance of the ResponseWrapper class.
*/
constructor(type, code, message, jsonref, jsonpath, id, validationCategory, providerNamespace, resourceType) {
constructor(type, code, message, innerErrors, jsonref, jsonpath, id, validationCategory, providerNamespace, resourceType) {
this.code = code;
this.code = code;
this.message = message;
this.innerErrors = innerErrors;
this.jsonref = jsonref;
this.jsonpath = jsonpath;
this.id = id;