Skip to content

Commit cf8ef92

Browse files
docs: add introduction for adapting to uniapp
1 parent 4387504 commit cf8ef92

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.changeset/nice-planets-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'openapi-ts-request': patch
3+
---
4+
5+
docs: add introduction for adapting to uniapp

README-en_US.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Generate TS interfaces, request client, request mock service, enum, type field l
1111
- support Swagger2.0/OpenAPI 3.0,3.1 specification
1212
- generate TypeScript interface, reuquest client, request mock service, enum, type field label, JSON Schemas
1313
- support work with npx, CLI, Nodejs
14-
- support custom request function, Fetch、Axios、UniApp-request、Node.js、XHR client available
14+
- support custom request function, Fetch、Axios、[UniApp-request](https://github.com/openapi-ui/openapi-ts-request/issues/46)、Node.js、XHR client available
1515
- support filter generate result by tags
1616
- support JSON specification
1717

@@ -200,6 +200,10 @@ export declare function patchSchema<T extends object>(
200200

201201
currently using [mockjs](http://mockjs.com) to generate mock data, the mocks file startup needs to rely on [@umijs/server](https://umijs.org/docs/guides/mock), we will look for other solutions later to achieve a better mock experience
202202

203+
## Adapt to uniapp
204+
205+
it is recommended to use a custom request function to adapt to uniapp. you can also use the `@uni-helper/axios-adapter` adapter. for details, see [issue#46](https://github.com/openapi-ui/openapi-ts-request/issues/46)
206+
203207
## Contribute
204208

205209
### Development Environment

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
- 支持 Swagger2.0/OpenAPI 3.0,3.1 定义
1212
- 生成 TS 类型, 请求客户端, 请求模拟服务, 枚举, 类型字段翻译, JSON Schemas
1313
- 支持通过 npx、CLI、Nodejs 的方式使用
14-
- 支持自定义请求工具函数, 支持 Fetch、Axios、UniApp-Request、Node.js、XHR 客户端
14+
- 支持自定义请求工具函数, 支持 Fetch、Axios、[UniApp-Request](https://github.com/openapi-ui/openapi-ts-request/issues/46)、Node.js、XHR 客户端
1515
- 支持通过 tags 过滤生成结果
1616
- 支持 JSON 定义文件
1717

@@ -200,6 +200,10 @@ export declare function patchSchema<T extends object>(
200200

201201
目前使用 [mockjs](http://mockjs.com) 生成 mock 数据,mocks 文件启动需要借助 [@umijs/server](https://umijs.org/docs/guides/mock),后面会寻找其他方案以达到更好的 mock 体验
202202

203+
## 适配uniapp
204+
205+
适配 uniapp 推荐采用自定义 request 函数的方式,你也可以使用 `@uni-helper/axios-adapter` 适配器,详情见 [issue#46](https://github.com/openapi-ui/openapi-ts-request/issues/46)
206+
203207
## 贡献
204208

205209
### 环境要求

0 commit comments

Comments
 (0)