api-gensdk
Advanced tools
@@ -16,4 +16,2 @@ export interface RouteMetadataType { | ||
params: ParamType[]; | ||
/** path中参数定义 */ | ||
paramsInPath: ParamType[]; | ||
} | ||
@@ -29,2 +27,6 @@ export interface ParamType { | ||
} | ||
export interface TemplateRouteType extends RouteMetadataType { | ||
/** path中参数定义 */ | ||
paramsInPath: ParamType[]; | ||
} | ||
export declare class GenConfig { | ||
@@ -31,0 +33,0 @@ /** 生成目录 */ |
@@ -55,3 +55,2 @@ "use strict"; | ||
} | ||
metadata[ClassName].push(route); | ||
// 类型兼容 | ||
@@ -68,4 +67,3 @@ route.params.forEach(param => { | ||
}); | ||
// param in path | ||
route.paramsInPath = route.params.filter(p => p.in === 'path'); | ||
metadata[ClassName].push(Object.assign({}, route, { paramsInPath: route.params.filter(p => p.in === 'path') })); | ||
}); | ||
@@ -72,0 +70,0 @@ const fileTemplate = fs.readFileSync(templatePath, 'utf8'); |
{ | ||
"name": "api-gensdk", | ||
"version": "0.1.10", | ||
"version": "0.1.11", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
11935
0.4%