Skip to content

Commit f4de777

Browse files
authored
docs: update dependencies (orval-labs#2790)
* docs: update dependencies * chore: formatted using prettier 3.8
1 parent 687353f commit f4de777

7 files changed

Lines changed: 713 additions & 2463 deletions

File tree

docs/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919
"@mdx-js/loader": "^3.1.1",
2020
"@mdx-js/react": "^3.1.1",
2121
"@monaco-editor/react": "^4.7.0",
22-
"@next/mdx": "16.0.0",
23-
"@octokit/graphql": "^9.0.2",
22+
"@next/mdx": "16.1.3",
23+
"@octokit/graphql": "^9.0.3",
2424
"@reactions/component": "^2.0.2",
2525
"@tanstack/react-query": "^5.85.3",
2626
"@types/mdx": "^2.0.13",
27-
"@types/react": "19.2.2",
28-
"@types/react-dom": "19.2.2",
29-
"axios": "^1.12.2",
27+
"@types/react": "19.2.8",
28+
"@types/react-dom": "19.2.3",
29+
"axios": "^1.13.2",
3030
"body-scroll-lock": "^3.1.5",
3131
"classnames": "^2.5.1",
3232
"copy-to-clipboard": "^3.3.3",
33-
"dedent": "^1.7.0",
33+
"dedent": "^1.7.1",
3434
"docsearch.js": "^2.6.3",
35-
"next": "^16.0.10",
36-
"orval": "^7.18.0",
37-
"prettier": "3.6.2",
35+
"next": "^16.1.3",
36+
"orval": "^8.0.1",
37+
"prettier": "3.8.0",
3838
"prism-react-renderer": "^2.4.1",
3939
"prismjs": "^1.30.0",
4040
"react": "^19.2.3",
@@ -54,16 +54,16 @@
5454
"remark-mdx-frontmatter": "^5.2.0",
5555
"remark-toc": "^9.0.0",
5656
"unist-util-visit": "^5.0.0",
57-
"use-debounce": "^10.0.6",
58-
"yaml": "^2.8.1"
57+
"use-debounce": "^10.1.0",
58+
"yaml": "^2.8.2"
5959
},
6060
"devDependencies": {
61-
"@tailwindcss/forms": "^0.5.10",
62-
"@tailwindcss/postcss": "^4.1.16",
63-
"monaco-editor": "^0.54.0",
61+
"@tailwindcss/forms": "^0.5.11",
62+
"@tailwindcss/postcss": "^4.1.18",
63+
"monaco-editor": "^0.55.1",
6464
"nextjs-sitemap-generator": "^1.3.1",
6565
"postcss": "8.5.6",
66-
"tailwindcss": "^4.1.16"
66+
"tailwindcss": "^4.1.18"
6767
},
6868
"engines": {
6969
"node": "22.x"

docs/src/pages/guides/solid-query.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ export const createShowPetById = <
4848
>(
4949
petId: string,
5050
options?: {
51-
query?: CreateQueryOptions<Awaited<ReturnType<typeof showPetById>>, TError, TData>;
51+
query?: CreateQueryOptions<
52+
Awaited<ReturnType<typeof showPetById>>,
53+
TError,
54+
TData
55+
>;
5256
axios?: AxiosRequestConfig;
5357
},
5458
) => {

docs/src/pages/guides/solid-start.mdx

Lines changed: 28 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -41,36 +41,36 @@ export const SwaggerPetstore = {
4141
const url = queryString ? `/pets?${queryString}` : `/pets`;
4242
const response = await fetch(url, {
4343
method: 'GET',
44-
headers: { 'Content-Type': 'application/json' }
44+
headers: { 'Content-Type': 'application/json' },
4545
});
4646
if (!response.ok) {
4747
throw new Error(`HTTP error! status: ${response.status}`);
4848
}
4949
return response.json() as Promise<Pets>;
50-
}, "listPets"),
50+
}, 'listPets'),
5151

5252
createPets: action(async (createPetsBody: CreatePetsBody) => {
5353
const response = await fetch('/pets', {
5454
method: 'POST',
5555
headers: { 'Content-Type': 'application/json' },
56-
body: JSON.stringify(createPetsBody)
56+
body: JSON.stringify(createPetsBody),
5757
});
5858
if (!response.ok) {
5959
throw new Error(`HTTP error! status: ${response.status}`);
6060
}
6161
return response.json() as Promise<Pet>;
62-
}, "createPets"),
62+
}, 'createPets'),
6363

6464
showPetById: query(async (petId: string) => {
6565
const response = await fetch(`/pets/${petId}`, {
6666
method: 'GET',
67-
headers: { 'Content-Type': 'application/json' }
67+
headers: { 'Content-Type': 'application/json' },
6868
});
6969
if (!response.ok) {
7070
throw new Error(`HTTP error! status: ${response.status}`);
7171
}
7272
return response.json() as Promise<Pet>;
73-
}, "showPetById"),
73+
}, 'showPetById'),
7474
};
7575
```
7676

@@ -107,15 +107,15 @@ import { revalidate } from '@solidjs/router';
107107
import { SwaggerPetstore } from './petstore';
108108

109109
// Invalidate a specific pet by ID
110-
revalidate(SwaggerPetstore.showPetById.keyFor("pet-123"));
110+
revalidate(SwaggerPetstore.showPetById.keyFor('pet-123'));
111111

112112
// Invalidate all pets
113113
revalidate(SwaggerPetstore.listPets.key);
114114

115115
// Invalidate multiple specific queries
116116
revalidate([
117-
SwaggerPetstore.showPetById.keyFor("pet-123"),
118-
SwaggerPetstore.showPetById.keyFor("pet-456"),
117+
SwaggerPetstore.showPetById.keyFor('pet-123'),
118+
SwaggerPetstore.showPetById.keyFor('pet-456'),
119119
SwaggerPetstore.listPets.key,
120120
]);
121121
```
@@ -141,9 +141,7 @@ function PetDetails(props: { petId: string }) {
141141
<div>
142142
<h1>{pet()?.name}</h1>
143143
<p>ID: {pet()?.id}</p>
144-
<button onClick={handleRefresh}>
145-
Refresh Pet Data
146-
</button>
144+
<button onClick={handleRefresh}>Refresh Pet Data</button>
147145
</div>
148146
</Suspense>
149147
);
@@ -186,11 +184,7 @@ function DeletePetButton(props: { petId: string }) {
186184
// Actions automatically revalidate all active queries on the page
187185
};
188186

189-
return (
190-
<button onClick={handleDelete}>
191-
Delete Pet
192-
</button>
193-
);
187+
return <button onClick={handleDelete}>Delete Pet</button>;
194188
}
195189
```
196190

@@ -251,14 +245,11 @@ This will generate code that uses your custom instance with the Fetch API signat
251245
export const SwaggerPetstore = {
252246
showPetById: query(async (petId: string) => {
253247
const url = `/pets/${petId}`;
254-
return customInstance<Pet>(
255-
url,
256-
{
257-
method: 'GET',
258-
headers: { 'Content-Type': 'application/json' }
259-
}
260-
);
261-
}, "showPetById"),
248+
return customInstance<Pet>(url, {
249+
method: 'GET',
250+
headers: { 'Content-Type': 'application/json' },
251+
});
252+
}, 'showPetById'),
262253
};
263254
```
264255

@@ -271,11 +262,11 @@ export const customInstance = async <T>(
271262
options: RequestInit,
272263
): Promise<T> => {
273264
const response = await fetch(url, options);
274-
265+
275266
if (!response.ok) {
276267
throw new Error(`HTTP error! status: ${response.status}`);
277268
}
278-
269+
279270
return response.json();
280271
};
281272
```
@@ -286,16 +277,16 @@ export const customInstance = async <T>(
286277

287278
**If you are using SolidStart, it's highly recommended to use its built-in primitives** (`query()` and `action()` from `@solidjs/router`) instead of Solid Query. These primitives are designed to work seamlessly with SolidStart's server-side rendering, routing, and caching systems.
288279

289-
| Feature | Solid Query | SolidStart |
290-
|---------|------------|-----------|
291-
| Package | `@tanstack/solid-query` | `@solidjs/router` (via SolidStart) |
292-
| Use Case | Standalone Solid apps | SolidStart applications |
293-
| Query Hook | `createQuery` | `query()` |
294-
| Mutation Hook | `createMutation` | `action()` |
295-
| Cache Keys | Manual query key functions | Automatic via `.key` and `.keyFor()` |
296-
| HTTP Client | Configurable (axios, fetch, etc.) | Native fetch API |
297-
| Query Options | Full TanStack Query options | Simpler, opinionated options |
298-
| SSR Integration | Manual configuration | Built-in and automatic |
280+
| Feature | Solid Query | SolidStart |
281+
| --------------- | --------------------------------- | ------------------------------------ |
282+
| Package | `@tanstack/solid-query` | `@solidjs/router` (via SolidStart) |
283+
| Use Case | Standalone Solid apps | SolidStart applications |
284+
| Query Hook | `createQuery` | `query()` |
285+
| Mutation Hook | `createMutation` | `action()` |
286+
| Cache Keys | Manual query key functions | Automatic via `.key` and `.keyFor()` |
287+
| HTTP Client | Configurable (axios, fetch, etc.) | Native fetch API |
288+
| Query Options | Full TanStack Query options | Simpler, opinionated options |
289+
| SSR Integration | Manual configuration | Built-in and automatic |
299290

300291
Choose **SolidStart client** when building a SolidStart application. Choose **Solid Query client** only if you're building a standalone SolidJS app without the SolidStart framework and need advanced TanStack Query features like optimistic updates, background refetching, and complex caching strategies.
301292

docs/src/pages/reference/configuration/input.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ export default defineConfig({
150150
{
151151
domains: ['api.example.com'],
152152
headers: {
153-
'Authorization': 'Bearer YOUR_TOKEN',
153+
Authorization: 'Bearer YOUR_TOKEN',
154154
'X-API-Key': 'your-api-key',
155155
},
156156
},
@@ -175,13 +175,13 @@ export default defineConfig({
175175
{
176176
domains: ['api.example.com', 'api.prod.example.com'],
177177
headers: {
178-
'Authorization': 'Bearer PROD_TOKEN',
178+
Authorization: 'Bearer PROD_TOKEN',
179179
},
180180
},
181181
{
182182
domains: ['api.dev.example.com'],
183183
headers: {
184-
'Authorization': 'Bearer DEV_TOKEN',
184+
Authorization: 'Bearer DEV_TOKEN',
185185
},
186186
},
187187
],

docs/src/pages/reference/integration.mdx

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -61,56 +61,56 @@ import { generate, type GlobalOptions } from 'orval';
6161

6262
const globalOptions: GlobalOptions = {
6363
// File watching
64-
watch: true, // Enable watch mode (boolean)
65-
64+
watch: true, // Enable watch mode (boolean)
65+
6666
// OR
6767
// watch: './specs/**/*.yaml', // Watch specific file pattern (string)
68-
68+
6969
// OR
7070
// watch: ['./specs/*.yaml', './src/types.ts'], // Watch multiple patterns (string[])
71-
71+
7272
// Output control
73-
clean: true, // Clean all output directories (boolean)
74-
73+
clean: true, // Clean all output directories (boolean)
74+
7575
// OR
7676
// clean: ['./src/api', './types'], // Clean specific directories (string[])
77-
78-
output: './src/generated', // Override output directory
79-
77+
78+
output: './src/generated', // Override output directory
79+
8080
// Code formatting
81-
prettier: true, // Format with Prettier [Pretter Output Options](https://orval.dev/reference/configuration/output#prettier)
82-
biome: true, // Format with Biome [Biome Output Options](https://orval.dev/reference/configuration/output#biome)
83-
84-
// HTTP client configuration
85-
client: 'fetch', // Override HTTP client: 'axios' | 'angular' | 'fetch' | 'swr' | 'react-query' | 'vue-query' | 'svelte-query' [Client Output Options](https://orval.dev/reference/configuration/output#client)
86-
httpClient: 'fetch', // HTTP implementation: 'axios' | 'fetch' [HttpClient Output Options](https://orval.dev/reference/configuration/output#httpclient)
87-
81+
prettier: true, // Format with Prettier [Pretter Output Options](https://orval.dev/reference/configuration/output#prettier)
82+
biome: true, // Format with Biome [Biome Output Options](https://orval.dev/reference/configuration/output#biome)
83+
84+
// HTTP client configuration
85+
client: 'fetch', // Override HTTP client: 'axios' | 'angular' | 'fetch' | 'swr' | 'react-query' | 'vue-query' | 'svelte-query' [Client Output Options](https://orval.dev/reference/configuration/output#client)
86+
httpClient: 'fetch', // HTTP implementation: 'axios' | 'fetch' [HttpClient Output Options](https://orval.dev/reference/configuration/output#httpclient)
87+
8888
// Generation mode
89-
mode: 'split', // Output mode: 'single' | 'split' | 'tags' | 'tags-split'
90-
89+
mode: 'split', // Output mode: 'single' | 'split' | 'tags' | 'tags-split'
90+
9191
// Mock data generation
92-
mock: true, // Enable mock data generation (boolean)
93-
94-
// OR
92+
mock: true, // Enable mock data generation (boolean)
93+
94+
// OR
9595
// mock: { // Configure mock options (GlobalMockOptions)
9696
// type: 'msw',
9797
// delay: 1000,
9898
// },
99-
99+
100100
// TypeScript configuration
101-
// Use EITHER a custom tsconfig path (string)...
102-
tsconfig: './tsconfig.json', // Custom tsconfig path (string)
103-
// ...OR an inline tsconfig object:
104-
// tsconfig: {
105-
// compilerOptions: {
106-
// target: 'ES2020',
107-
// esModuleInterop: true,
108-
// },
101+
// Use EITHER a custom tsconfig path (string)...
102+
tsconfig: './tsconfig.json', // Custom tsconfig path (string)
103+
// ...OR an inline tsconfig object:
104+
// tsconfig: {
105+
// compilerOptions: {
106+
// target: 'ES2020',
107+
// esModuleInterop: true,
108+
// },
109109
// },
110-
110+
111111
// Package configuration
112112
packageJson: './package.json', // Custom package.json path
113-
input: './api-spec.yaml', // Override input specification
113+
input: './api-spec.yaml', // Override input specification
114114
};
115115

116116
await generate('./orval.config.js', process.cwd(), globalOptions);
@@ -134,14 +134,14 @@ function generate(
134134
optionsExport?: string | OptionsExport,
135135
workspace?: string,
136136
options?: GlobalOptions,
137-
): Promise<void>
137+
): Promise<void>;
138138
```
139139

140140
#### Parameters
141141

142-
- **`optionsExport`** *(optional)*: Path to config file or configuration object
143-
- **`workspace`** *(optional)*: Working directory (defaults to `process.cwd()`)
144-
- **`options`** *(optional)*: Global options to override config settings
142+
- **`optionsExport`** _(optional)_: Path to config file or configuration object
143+
- **`workspace`** _(optional)_: Working directory (defaults to `process.cwd()`)
144+
- **`options`** _(optional)_: Global options to override config settings
145145

146146
### Watch Mode
147147

@@ -151,13 +151,13 @@ Enable file watching for automatic regeneration:
151151
import { generate } from 'orval';
152152

153153
// Enable watch mode via global options
154-
await generate('./orval.config.js', process.cwd(), {
155-
watch: true
154+
await generate('./orval.config.js', process.cwd(), {
155+
watch: true,
156156
});
157157

158158
// Watch specific files/directories
159-
await generate('./orval.config.js', process.cwd(), {
160-
watch: ['./specs/*.yaml', './src/custom-types.ts']
159+
await generate('./orval.config.js', process.cwd(), {
160+
watch: ['./specs/*.yaml', './src/custom-types.ts'],
161161
});
162162
```
163163

@@ -190,4 +190,4 @@ async function main() {
190190
}
191191

192192
main();
193-
```
193+
```

0 commit comments

Comments
 (0)