Skip to content

Commit 864d6c0

Browse files
committed
chore(deps): update @hey-api/openapi-ts to 0.42.1
1 parent 18ac5fa commit 864d6c0

19 files changed

+473
-347
lines changed

README.md

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@ Options:
4545
-o, --output <value> Output directory (default: "openapi")
4646
-c, --client <value> HTTP client to generate [fetch, xhr, node, axios, angular] (default: "fetch")
4747
--request <value> Path to custom request file
48-
--useDateType Use Date type instead of string for date types for models, this will not convert the data to a Date object
49-
--enums <value> Generate JavaScript objects from enum definitions? ['javascript', 'typescript']
50-
--base <value> Manually set base in OpenAPI config instead of inferring from server value
51-
--serviceResponse <value> Define shape of returned value from service calls ['body', 'generics', 'response']
48+
--format <value> Process output folder with formatter? ['biome', 'prettier']
49+
--lint <value> Process output folder with linter? ['eslint', 'biome']
5250
--operationId Use operation ID to generate operation names?
53-
--lint Process output folder with linter?
54-
--format Process output folder with formatter?
51+
--serviceResponse <value> Define shape of returned value from service calls ['body', 'generics', 'response']
52+
--base <value> Manually set base in OpenAPI config instead of inferring from server value
53+
--enums <value> Generate JavaScript objects from enum definitions? ['javascript', 'typescript']
54+
--useDateType Use Date type instead of string for date types for models, this will not convert the data to a Date object
55+
--debug Enable debug mode
56+
--noSchemas Disable generating schemas for request and response objects
57+
--schemaTypes <value> Define the type of schema generation ['form', 'json'] (default: "json")
5558
-h, --help display help for command
5659
```
5760

@@ -86,11 +89,7 @@ function App() {
8689
return (
8790
<div className="App">
8891
<h1>Pet List</h1>
89-
<ul>
90-
{data?.map((pet) => (
91-
<li key={pet.id}>{pet.name}</li>
92-
))}
93-
</ul>
92+
<ul>{data?.map((pet) => <li key={pet.id}>{pet.name}</li>)}</ul>
9493
</div>
9594
);
9695
}
@@ -129,13 +128,7 @@ import { useDefaultClientFindPetsSuspense } from "../openapi/queries/suspense";
129128
function ChildComponent() {
130129
const { data } = useDefaultClientFindPetsSuspense({ tags: [], limit: 10 });
131130

132-
return (
133-
<ul>
134-
{data?.map((pet, index) => (
135-
<li key={pet.id}>{pet.name}</li>
136-
))}
137-
</ul>
138-
);
131+
return <ul>{data?.map((pet, index) => <li key={pet.id}>{pet.name}</li>)}</ul>;
139132
}
140133

141134
function ParentComponent() {

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/cli.mjs -i ./petstore.yaml -c axios --request ./request.ts",
12+
"generate:api": "rimraf ./openapi && node ../../dist/cli.mjs -i ./petstore.yaml -c axios --request ./request.ts",
1313
"test:generated": "tsc -p ./tsconfig.openapi.json --noEmit"
1414
},
1515
"dependencies": {

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"author": "Daiki Urata (@7nohe)",
3939
"license": "MIT",
4040
"devDependencies": {
41-
"@hey-api/openapi-ts": "0.36.0",
41+
"@hey-api/openapi-ts": "0.42.1",
4242
"@types/node": "^20.10.6",
4343
"@vitest/coverage-v8": "^1.5.0",
4444
"commander": "^12.0.0",
@@ -49,11 +49,11 @@
4949
"vitest": "^1.5.0"
5050
},
5151
"peerDependencies": {
52-
"@hey-api/openapi-ts": "0.36.0",
53-
"commander": ">= 11 < 13",
54-
"glob": ">= 10",
55-
"ts-morph": ">= 22 < 23",
56-
"typescript": ">= 4.8.3"
52+
"@hey-api/openapi-ts": "0.42.1",
53+
"commander": "12.x",
54+
"glob": "10.x",
55+
"ts-morph": "22.x",
56+
"typescript": "5.x"
5757
},
5858
"engines": {
5959
"node": ">=14"

0 commit comments

Comments
 (0)