Skip to content

Commit 1588d26

Browse files
Merge pull request #534 from openapi-ui/main
chore: merge main to release
2 parents 4049848 + 4123907 commit 1588d26

File tree

12 files changed

+393
-121
lines changed

12 files changed

+393
-121
lines changed

.changeset/nice-tips-listen.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+
fix: fix bug #525

README-en_US.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ openapi -i ./spec.json -o ./apis
252252
| isOnlyGenTypeScriptType | no | boolean | false | only generate typescript type |
253253
| isCamelCase | no | boolean | true | camelCase naming of controller files and request client |
254254
| isSupportParseEnumDesc | no | boolean | false | parse enum description to generate enum label, format example: `UserRole:User(Normal User)=0,Agent(Agent)=1,Admin(Administrator)=2` |
255+
| binaryMediaTypes | no | string[] | - | custom binary media types list, default includes: ['application/octet-stream', 'application/pdf', 'image/*', 'video/*', 'audio/*'] |
255256
| hook | no | [Custom Hook](#Custom-Hook) | - | custom hook |
256257

257258
## Custom Hook

README.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
<!-- TODO:需要修改文档, 添加参数, 添加apifox的配置支持 -->
2-
31
## 介绍
42

53
[![GitHub Repo stars](https://img.shields.io/github/stars/openapi-ui/openapi-ts-request?style=social)](https://github.com/openapi-ui/openapi-ts-request) [![npm (scoped)](https://img.shields.io/npm/v/openapi-ts-request)](https://www.npmjs.com/package/openapi-ts-request) ![GitHub tag](https://img.shields.io/github/v/tag/openapi-ui/openapi-ts-request?include_prereleases)
@@ -50,8 +48,6 @@ pnpm i openapi-ts-request -D
5048
import type { GenerateServiceProps } from 'openapi-ts-request';
5149

5250
export default {
53-
// schemaPath: './openapi.json', // 本地openapi文件
54-
// serversPath: './src/apis', // 接口存放路径
5551
schemaPath: 'http://petstore.swagger.io/v2/swagger.json',
5652
} as GenerateServiceProps;
5753
```
@@ -254,6 +250,7 @@ openapi --i ./spec.json --o ./apis
254250
| isOnlyGenTypeScriptType || boolean | false | 仅生成 typescript 类型 |
255251
| isCamelCase || boolean | true | 小驼峰命名文件和请求函数 |
256252
| isSupportParseEnumDesc || boolean | false | 解析枚举描述生成枚举标签,格式参考:`系统用户角色:User(普通用户)=0,Agent(经纪人)=1,Admin(管理员)=2` |
253+
| binaryMediaTypes || string[] | - | 自定义二进制媒体类型列表,默认包含:['application/octet-stream', 'application/pdf', 'image/*', 'video/*', 'audio/*'] |
257254
| hook || [Custom Hook](#Custom-Hook) | - | 自定义 hook |
258255

259256
## 自定义 Hook

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"openapi-types": "^12.1.3",
8282
"sanitize-filename": "^1.6.3",
8383
"ts-node": "^10.9.2",
84-
"typescript": "5.9.2",
84+
"typescript": "5.9.3",
8585
"vitest": "^2.1.9"
8686
},
8787
"keywords": [

0 commit comments

Comments
 (0)