You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- support Swagger2.0/OpenAPI/Apifox 3.0,3.1 specification
21
-
- generate TypeScript interface, reuquest client, request mock service, enum, type field label, JSON Schemas
22
+
- generate TypeScript/JavaScript, reuquest client(support any client), request mock service, enum and enum translation, react-query, type field label, JSON Schemas
22
23
- support work with npx, CLI, Nodejs
23
-
- support custom request function, Fetch、Axios、[UniApp-request](https://github.com/openapi-ui/openapi-ts-request/issues/46)、Node.js、XHR client available
24
+
- support custom request function, Fetch、Axios、[UniApp-request](https://github.com/openapi-ui/openapi-ts-request/issues/46)、Taro-Request、Node.js、XHR client available
24
25
- support filter generate result by tags
25
26
- support JSON/YAML specification
26
27
- support translate chinese tag name to english tag name
@@ -94,10 +95,13 @@ import request from 'axios';
94
95
import*asAPIfrom'./types';
95
96
96
97
/** Update an existing pet PUT /pet */
97
-
exportasyncfunction updatePet(
98
-
body:API.Pet,
99
-
options?: { [key:string]:unknown }
100
-
) {
98
+
exportasyncfunction updatePet({
99
+
body,
100
+
options,
101
+
}: {
102
+
body:API.Pet;
103
+
options?: { [key:string]:unknown };
104
+
}) {
101
105
returnrequest<unknown>(`/pet`, {
102
106
method: 'PUT',
103
107
headers: {
@@ -177,31 +181,30 @@ $ openapi --help
177
181
Usage: openapi [options]
178
182
179
183
Options:
180
-
-V, --version output the version number
181
-
-i, --input <string> OpenAPI specification, can be a path, url (required)
Copy file name to clipboardExpand all lines: package.json
+15-10Lines changed: 15 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,8 @@
1
1
{
2
2
"name": "openapi-ts-request",
3
3
"version": "0.13.4",
4
-
"description": "Swagger2/OpenAPI3 to TypeScript, request client, request mock service, enum, type field label, JSON Schemas",
5
-
"packageManager": "pnpm@9.11.0",
4
+
"description": "Swagger2/OpenAPI3/Apifox to TypeScript/JavaScript, request client(support any client), request mock service, enum and enum translation, react-query, type field label, JSON Schemas",
0 commit comments