0.1.1 • Published 12 months ago
sxfe-create-api v0.1.1
@sxfe/create-api
介绍
一个用于根据openapi规范快速生成前端接口请求方法的工具
使用
安装
npm install @sxfe/create-api -D
在项目根目录下创建create-api.config.js
文件,配置如下
import { defineConfig } from "@sxfe/create-api";
/**
* @returns {import("@sxfe/create-api").ResFnOption}
* @description 一个提供类型友好的方法。
*/
export default defineConfig({
url: "https://api.example.com", // 接口的openapi地址
});