MCPcopy Create free account
hub / github.com/DTStack/Taier / getSwaggerPath

Function getSwaggerPath

taier-ui/scripts/getSwagger.js:95–108  ·  view source on GitHub ↗
(url = '', prefixPath)

Source from the content-addressed store, hash-verified

93 * @param {string} url -url地址
94 */
95const getSwaggerPath = (url = '', prefixPath) => {
96 return new Promise((resolve, reject) => {
97 get({}, url)
98 .then((res) => res[0].location)
99 .then((res) => {
100 prefixPath
101 ? resolve(`${prefixPath.protocol}//${prefixPath.host}${res}`)
102 : resolve(res);
103 })
104 .catch((err) => {
105 reject(err);
106 });
107 });
108};
109/**
110 * @description 用于合并两个数组对象
111 * @param {Array} arr1

Callers 1

swaggerFunction · 0.85

Calls 1

getFunction · 0.85

Tested by

no test coverage detected