openapi接口文档解析支持

This commit is contained in:
暮光:城中城
2021-12-28 23:58:43 +08:00
parent bc7ae4fc67
commit 74b1b417ad
34 changed files with 196 additions and 3150 deletions

View File

@@ -30,7 +30,7 @@ export default createStore({
// openApi原始文档
openApiDoc: {},
// openApi原始definitions
openApiDefinitions: {},
openApiComponents: {},
// url对应的map信息 {'url + "." + method': {swagger.paths.url.method对象信息}}
openApiUrlMethodMap: {},
// 方法统计{post: 10, total: 20}
@@ -94,7 +94,7 @@ export default createStore({
// openApi
setOpenApiDoc(state, openApiDoc) {
state.openApiDoc = openApiDoc;
state.openApiDefinitions = openApiDoc.definitions || {};
state.openApiComponents = openApiDoc.components || {};
},
setOpenApiUrlMethodMap(state, openApiUrlMethodMap) {
state.openApiUrlMethodMap = openApiUrlMethodMap;