提交 ebe802bf authored 作者: vipcxj's avatar vipcxj

增加接口文档的读写接口。

上级 55f847fe
...@@ -16,6 +16,9 @@ export const userApi = { ...@@ -16,6 +16,9 @@ export const userApi = {
async invokeInterface(name, params, dmPath) { async invokeInterface(name, params, dmPath) {
return post(`${config.apiContextPath}/api/interface/user/${encodeURIComponent(name)}/invoke`, { params, dmPath }); return post(`${config.apiContextPath}/api/interface/user/${encodeURIComponent(name)}/invoke`, { params, dmPath });
}, },
async getInterfaceDocument(name, dmPath) {
return request(`${config.apiContextPath}/api/interface/user/${encodeURIComponent(name)}/document`, { dmPath });
},
}; };
export const adminApi = { export const adminApi = {
...@@ -43,4 +46,10 @@ export const adminApi = { ...@@ -43,4 +46,10 @@ export const adminApi = {
async removeInterfaceConfigure(name, dmPath) { async removeInterfaceConfigure(name, dmPath) {
return doDelete(`${config.apiContextPath}/api/interface/admin/${encodeURIComponent(name)}/configure`, { dmPath }); return doDelete(`${config.apiContextPath}/api/interface/admin/${encodeURIComponent(name)}/configure`, { dmPath });
}, },
async getInterfaceDocument(name, dmPath) {
return request(`${config.apiContextPath}/api/interface/admin/${encodeURIComponent(name)}/document`, { dmPath });
},
async setInterfaceDocument(name, document, dmPath) {
return post(`${config.apiContextPath}/api/interface/admin/${encodeURIComponent(name)}/document`, { document, dmPath });
},
}; };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论