Skip to content

Commit 5d7cd9c

Browse files
committed
feat!: changing openapi generator
Changed openapi code generator to @hey-api/openapi-ts. Not supporting all properties yet. Supporting new properties: - base - serviceResponse - enums - useDateType indent and useUnionTypes properties were removed left in for backwards compatibility.
1 parent 4c01176 commit 5d7cd9c

File tree

12 files changed

+845
-679
lines changed

12 files changed

+845
-679
lines changed

examples/react-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"dev:mock": "prism mock ./petstore.yaml --dynamic",
1010
"build": "tsc && vite build",
1111
"preview": "vite preview",
12-
"generate:api": "node ../../dist/src/cli.js -i ./petstore.yaml -c axios --exportSchemas=true --postfixServices=Client --request ./request.ts",
12+
"generate:api": "node ../../dist/cli.js -i ./petstore.yaml -c axios --postfixServices=Client --request ./request.ts",
1313
"test:generated": "tsc ./openapi/queries/index.ts --noEmit --target esnext --moduleResolution node"
1414
},
1515
"dependencies": {

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"version": "0.5.3",
44
"description": "OpenAPI React Query Codegen",
55
"bin": {
6-
"openapi-rq": "dist/src/cli.js"
6+
"openapi-rq": "dist/cli.js"
77
},
8+
"type": "module",
89
"scripts": {
910
"build": "tsc -p tsconfig.json",
1011
"preview": "npm run build && npm -C examples/react-app run generate:api",
@@ -27,21 +28,22 @@
2728
"openapi",
2829
"swagger",
2930
"typescript",
30-
"openapi-typescript-codegen"
31+
"openapi-typescript-codegen",
32+
"@hey-api/openapi-ts"
3133
],
3234
"author": "Daiki Urata (@7nohe)",
3335
"license": "MIT",
3436
"devDependencies": {
37+
"@hey-api/openapi-ts": "0.27.38",
3538
"@types/node": "^20.10.6",
3639
"commander": "^12.0.0",
3740
"glob": "^10.3.10",
38-
"openapi-typescript-codegen": "0.25.0",
3941
"typescript": "^5.3.3"
4042
},
4143
"peerDependencies": {
44+
"@hey-api/openapi-ts": "0.27.38",
4245
"commander": ">= 11 < 13",
4346
"glob": ">= 10",
44-
"openapi-typescript-codegen": "^0.24.0",
4547
"typescript": ">= 4.8.3"
4648
}
4749
}

0 commit comments

Comments
 (0)