Skip to content

Commit 484703c

Browse files
committed
docs(README): 更新功能列表并优化代码导入
- 将"支持接口 Mock(待完成)"修改为"支持接口 Mock(可选)" - 优化了代码导入方式,使用相对路径并调整了类型导入的位置 - 简化了AxiosRequestConfig的类型定义
1 parent e51d902 commit 484703c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ OpenAPI(2.0/3.0/3.1) Schema → Type-safe Axios
1515
- 😉 类型安全的请求函数,轻松进行 tree shaking
1616
- 🤔 基于 [zod](https://zod.dev/) 支持了接口出入参的校验(可选)
1717
- 😋 支持生成原 Schema 文件以及中间处理的 Schema 文件(可选)
18-
- 🤗 支持接口 Mock(待完成
18+
- 🤗 支持接口 Mock(可选
1919

2020
# 安装
2121

@@ -72,10 +72,11 @@ npx openapi-axios
7272
* - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
7373
*/
7474

75-
import type { AxiosRequestConfig, AxiosResponse } from 'axios';
7675
import type * as Type from './pet-store.type.ts';
7776
import axios from 'axios';
7877

78+
type AxiosRequestConfig = Parameters<typeof axios.request>[0];
79+
7980
/**
8081
* @description Add a new pet to the store
8182
* @summary Add a new pet to the store

0 commit comments

Comments
 (0)