UNPKG

auto-request

Version:

通过Yapi JSON Schema生成接口Axios或Taro接口

27 lines 1.5 kB
import { AutoRequestOptions } from '@/core/snapshot'; import { SwaggerSource } from '@/core/swagger-fetcher'; export { renderMethodArgs } from '@/methods/base'; export { wrapperMethodPreInterface } from '@/methods/generator-interface'; export { extractFunctionsFromCode, extractFunctionsFromFile } from '@/helpers/countFunctions'; export type { AutoRequestOptions } from '@/core/snapshot'; export type { SwaggerSource, SwaggerHttpConfig, SwaggerFetcherFunction } from '@/core/swagger-fetcher'; export { saveSwaggerBackup } from '@/core/swagger-fetcher'; /** * 主函数:从 Swagger JSON 生成 API 接口代码 * @param source - Swagger 数据源(JSON 字符串、HTTP 配置或自定义获取函数) * @param output - 输出目录 * @param options - 配置选项 * @returns Promise with write function and template */ export declare const autoRequest: (source: SwaggerSource, output: string, options?: AutoRequestOptions) => Promise<unknown>; /** * 遍历模板函数(简化版,不包含快照功能) * @param source - Swagger 数据源(JSON 字符串、HTTP 配置或自定义获取函数) * @param output - 输出目录 * @param options - 配置选项 * @returns Promise with write function */ export declare const eachRequestTemplate: (source: SwaggerSource, output: string, options: AutoRequestOptions) => Promise<unknown>; export { generatorSnapshots } from '@/core/snapshot'; export { generateFile } from '@/core/file-generator'; //# sourceMappingURL=index.d.ts.map