/** * @desc * * @使用场景 * * @coder.yang2010@gmail.com * @Date 2020/5/12 **/ import { IMethodDefinded } from "../util/swagger"; import RequestParameter from "./request-parameter"; import { SchemaProps } from "../../../typings/api"; export declare type MethodName = "POST" | "GET" | "UPDATE" | "DELETE" | "OPTIONS"; export default class Method { methodInfo: IMethodDefinded; methodInfoOptions: { url: string; method: MethodName | string; }; constructor(methodInfo: IMethodDefinded, methodInfoOptions: { url: string; method: MethodName | string; }); private _name; get methodName(): string; get url(): string; /** * 方法名称; */ get name(): string; set name(newName: string); /** * 备注信息; */ get comment(): string; private params; get requestParam(): RequestParameter[]; getObjectJsonSchemas(): void; private _responseSchma; get responseSchema(): SchemaProps; set responseSchema(res: SchemaProps); tplGetMethodType(): string; tplGetMethodName(): string; /** * 模板: * 获取入参内容; */ tplGetRequestParamContent(): string; tplGetUrl(): string; tplGetBodyParam(): string; tplGetQueryParam(): string; tplGetResponseInterfaceName(): string; }