Skip to content

Commit 117ba74

Browse files
GeorgegriffCopilot
andauthored
docs: added info on 3.0 openapi removal (orval-labs#2756)
* docs: added info on 3.0 openapi removal * docs: added pr link to migration * docs: fix null docs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * docs: nullable fix --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent adf450c commit 117ba74

File tree

1 file changed

+31
-8
lines changed

1 file changed

+31
-8
lines changed

docs/src/pages/versions/v8.mdx

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,30 @@ If you were using dynamic imports:
307307
- **Future-proof**: Aligns with JavaScript ecosystem standards
308308
- **Stricter module boundaries**: Better encapsulation and type safety
309309

310-
### 2. Changed default value of httpClient from `axios` to `fetch`
310+
### 2. OpenAPI 3.0 Support Dropped in Favor of 3.1.0
311+
312+
Support for OpenAPI 3.0 specifications has been dropped in favor of the newer 3.1.0 standard. See [PR #2614](https://github.com/orval-labs/orval/pull/2614) for details.
313+
314+
#### How to migrate
315+
316+
If you're consuming APIs that use OpenAPI 3.0 specifications, you may need to update them to OpenAPI 3.1.0.
317+
318+
A common issue is replacing `nullable: true`:
319+
320+
```yaml
321+
# OpenAPI 3.0
322+
field:
323+
type: string
324+
nullable: true
325+
326+
# OpenAPI 3.1.0
327+
field:
328+
type: ["string", "null"]
329+
```
330+
331+
For a complete migration guide, see the [official OpenAPI migration documentation](https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0).
332+
333+
### 3. Changed default value of httpClient from `axios` to `fetch`
311334

312335
We changed the default httpClient from `axios` to `fetch` to reduce bundle size and eliminate the need for additional dependencies.
313336

@@ -329,7 +352,7 @@ export default {
329352
};
330353
```
331354

332-
### 3. Removed `override.fetch.explode` option
355+
### 4. Removed `override.fetch.explode` option
333356

334357
This parameter was kept only for compatibility. Since compatibility maintenance is no longer needed in major versions, it has been removed.
335358

@@ -349,7 +372,7 @@ paths:
349372
type: array
350373
```
351374

352-
### 4. Changed default value of `override.mock.delay` from `1000` to `false`
375+
### 5. Changed default value of `override.mock.delay` from `1000` to `false`
353376

354377
We disabled the default delay as it creates noise.
355378

@@ -369,7 +392,7 @@ export default {
369392
};
370393
```
371394

372-
### 5. Removed `override.coerceTypes`
395+
### 6. Removed `override.coerceTypes`
373396

374397
This was removed as it has been replaced by the more flexible and explicit `override.zod.coerce`.
375398

@@ -398,7 +421,7 @@ export default {
398421
};
399422
```
400423

401-
### 6. Removed `override.useNativeEnums`
424+
### 7. Removed `override.useNativeEnums`
402425

403426
This was removed as it has been integrated into `enumGenerationType`.
404427

@@ -419,7 +442,7 @@ export default {
419442
};
420443
```
421444

422-
### 7. Changed combined types generation (anyOf/oneOf/allOf)
445+
### 8. Changed combined types generation (anyOf/oneOf/allOf)
423446

424447
Combined types (`anyOf`, `oneOf`, `allOf`) are now inlined by default instead of creating intermediate type aliases.
425448

@@ -439,7 +462,7 @@ export default {
439462
};
440463
```
441464

442-
### 8. Zod Schema Naming Convention Changed to PascalCase
465+
### 9. Zod Schema Naming Convention Changed to PascalCase
443466

444467
All Zod schema exports now use PascalCase naming convention to align with TypeScript type definition standards.
445468

@@ -456,7 +479,7 @@ All Zod schema exports now use PascalCase naming convention to align with TypeSc
456479
+ export type CreatePetsBody = zod.infer<typeof CreatePetsBody>
457480
```
458481

459-
### 9. SWR custom error types are no longer generated by default
482+
### 10. SWR custom error types are no longer generated by default
460483

461484
Custom error type aliases (e.g., `ListPetsQueryError`, `CreatePetsMutationError`) are no longer generated by default as they simply re-export the error type without providing additional value.
462485

0 commit comments

Comments
 (0)