import { SchemaProps } from "../../../typings/api"; import Method from "./method"; export interface IParamAst { description: string; format: string; in: "query" | "path" | "body"; name: string; required: boolean; type: string; schema?: SchemaProps; } /** * 请求参数对象; */ export default class RequestParameter { ast: IParamAst; paramsOptions: { ownedMethod: Method; }; constructor(ast: IParamAst, paramsOptions: { ownedMethod: Method; }); /** * 获取参数名字 */ get name(): string; /** * 参数是否在query上 */ get isInQuery(): boolean; /** * 参数是否在path上 */ get isInPath(): boolean; /** * 参数是否在body上 */ get isInBody(): boolean; /** * 参数备注 */ get comment(): string; /** * 参数是否必须的 */ get isRequired(): boolean; /** * 获取参数定义信息; */ get jsonSchema(): import("../../../typings/api").IJSObjectProps | import("../../../typings/api").IJSArrayProps | import("../../../typings/api").JSStringProps | import("../../../typings/api").IJSNumberProps | import("../../../typings/api").IJSIntegerProps | import("../../../typings/api").IJsonSchemaRef | IParamAst; basicTypesMap: { integer: string; string: string; boolean: string; file: string; object: string; }; /** * 判断参数类型是不是基本类型; string int number 等; */ isBasicType(): boolean; /** * 要先判断是基本类型的 */ getBasicTsType(): any; getObjectJsonSchemas(): any | undefined; get schema(): import("../../../typings/api").IJSObjectProps | import("../../../typings/api").IJSArrayProps | import("../../../typings/api").JSStringProps | import("../../../typings/api").IJSNumberProps | import("../../../typings/api").IJSIntegerProps | import("../../../typings/api").IJsonSchemaRef | IParamAst; /** * 获取参数的interfaceName定义; */ tplGenInterfaceName(): string; }