openapi-route-expander
Version:
A utility for resolving $ref in OpenAPI YAML routes, generating new YAML files without $ref, ready for OpenAPI processing.
23 lines • 706 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Validation = void 0;
const file_util_1 = require("./util/file.util");
class Validation {
static absolutePath(path) {
if (file_util_1.FileUtil.isAbsolutePath(path)) {
return;
}
throw Error(`Path must be absolutePath. "${path}"`);
}
static pathExist(path) {
if (file_util_1.FileUtil.exists(path)) {
return;
}
throw Error(`Path doesn't exists. "${path}"`);
}
static absolutePaths(paths) {
paths.forEach((path) => Validation.absolutePath(path));
}
}
exports.Validation = Validation;
//# sourceMappingURL=validation.js.map