test-openapi
Version:
Automated client requests
20 lines (14 loc) • 509 B
JavaScript
;Object.defineProperty(exports,"__esModule",{value:true});exports.addPath=void 0;var _error=require("../../../../errors/error.js");
const addPath=function({url,rawRequest:{path=""}}){
validatePath({path});
return`${url}${path}`;
};exports.addPath=addPath;
const validatePath=function({path}){
if(path===""||path.startsWith("/")){
return;
}
throw new _error.TestOpenApiError("Request path must start with a slash",{
property:"task.call.path",
value:path});
};
//# sourceMappingURL=path.js.map