Skip to content

Commit

Permalink
feat!: changing openapi generator
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
seriouslag committed Mar 23, 2024
1 parent 4c01176 commit 5d7cd9c
Show file tree
Hide file tree
Showing 12 changed files with 845 additions and 679 deletions.
2 changes: 1 addition & 1 deletion examples/react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"dev:mock": "prism mock ./petstore.yaml --dynamic",
"build": "tsc && vite build",
"preview": "vite preview",
"generate:api": "node ../../dist/src/cli.js -i ./petstore.yaml -c axios --exportSchemas=true --postfixServices=Client --request ./request.ts",
"generate:api": "node ../../dist/cli.js -i ./petstore.yaml -c axios --postfixServices=Client --request ./request.ts",
"test:generated": "tsc ./openapi/queries/index.ts --noEmit --target esnext --moduleResolution node"
},
"dependencies": {
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"version": "0.5.3",
"description": "OpenAPI React Query Codegen",
"bin": {
"openapi-rq": "dist/src/cli.js"
"openapi-rq": "dist/cli.js"
},
"type": "module",
"scripts": {
"build": "tsc -p tsconfig.json",
"preview": "npm run build && npm -C examples/react-app run generate:api",
Expand All @@ -27,21 +28,22 @@
"openapi",
"swagger",
"typescript",
"openapi-typescript-codegen"
"openapi-typescript-codegen",
"@hey-api/openapi-ts"
],
"author": "Daiki Urata (@7nohe)",
"license": "MIT",
"devDependencies": {
"@hey-api/openapi-ts": "0.27.38",
"@types/node": "^20.10.6",
"commander": "^12.0.0",
"glob": "^10.3.10",
"openapi-typescript-codegen": "0.25.0",
"typescript": "^5.3.3"
},
"peerDependencies": {
"@hey-api/openapi-ts": "0.27.38",
"commander": ">= 11 < 13",
"glob": ">= 10",
"openapi-typescript-codegen": "^0.24.0",
"typescript": ">= 4.8.3"
}
}
Loading

0 comments on commit 5d7cd9c

Please sign in to comment.