Skip to content

Commit 1207dc1

Browse files
committed
feat(zod): promote zod4 registries to stable
1 parent 4f419f3 commit 1207dc1

14 files changed

Lines changed: 20 additions & 20 deletions

File tree

apps/content/docs/openapi/openapi-specification.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ For further customization, you can use the `JSON_SCHEMA_REGISTRY`, `JSON_SCHEMA_
273273
```ts
274274
import * as z from 'zod'
275275
import {
276-
experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY,
276+
JSON_SCHEMA_REGISTRY,
277277
} from '@orpc/zod/zod4'
278278

279279
export const InputSchema = z.object({

packages/zod/src/zod4/converter.meta.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import * as z from 'zod/v4'
22
import { testSchemaConverter } from '../../tests/shared'
33
import {
4-
experimental_JSON_SCHEMA_INPUT_REGISTRY as JSON_SCHEMA_INPUT_REGISTRY,
5-
experimental_JSON_SCHEMA_OUTPUT_REGISTRY as JSON_SCHEMA_OUTPUT_REGISTRY,
6-
experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY,
4+
JSON_SCHEMA_INPUT_REGISTRY,
5+
JSON_SCHEMA_OUTPUT_REGISTRY,
6+
JSON_SCHEMA_REGISTRY,
77
} from './registries'
88

99
const customSchema1 = z.string().meta({

packages/zod/src/zod4/converter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ import {
3434
globalRegistry,
3535
} from 'zod/v4/core'
3636
import {
37-
experimental_JSON_SCHEMA_INPUT_REGISTRY as JSON_SCHEMA_INPUT_REGISTRY,
38-
experimental_JSON_SCHEMA_OUTPUT_REGISTRY as JSON_SCHEMA_OUTPUT_REGISTRY,
39-
experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY,
37+
JSON_SCHEMA_INPUT_REGISTRY,
38+
JSON_SCHEMA_OUTPUT_REGISTRY,
39+
JSON_SCHEMA_REGISTRY,
4040
} from './registries'
4141

4242
export interface ZodToJsonSchemaConverterOptions {

packages/zod/src/zod4/registries.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { registry } from 'zod/v4/core'
1919
* })
2020
* ```
2121
*/
22-
export const experimental_JSON_SCHEMA_REGISTRY = registry<Exclude<JSONSchema<$input | $output>, boolean>>()
22+
export const JSON_SCHEMA_REGISTRY = registry<Exclude<JSONSchema<$input | $output>, boolean>>()
2323

2424
/**
2525
* Zod registry for customizing generated JSON schema, only useful for .input
@@ -38,7 +38,7 @@ export const experimental_JSON_SCHEMA_REGISTRY = registry<Exclude<JSONSchema<$in
3838
* })
3939
* ```
4040
*/
41-
export const experimental_JSON_SCHEMA_INPUT_REGISTRY = registry<Exclude<JSONSchema<$input>, boolean>>()
41+
export const JSON_SCHEMA_INPUT_REGISTRY = registry<Exclude<JSONSchema<$input>, boolean>>()
4242

4343
/**
4444
* Zod registry for customizing generated JSON schema, only useful for .input
@@ -57,4 +57,4 @@ export const experimental_JSON_SCHEMA_INPUT_REGISTRY = registry<Exclude<JSONSche
5757
* })
5858
* ```
5959
*/
60-
export const experimental_JSON_SCHEMA_OUTPUT_REGISTRY = registry<Exclude<JSONSchema<$output>, boolean>>()
60+
export const JSON_SCHEMA_OUTPUT_REGISTRY = registry<Exclude<JSONSchema<$output>, boolean>>()

playgrounds/astro/src/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
1+
import { JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
22
import * as z from 'zod'
33

44
export type NewUser = z.infer<typeof NewUserSchema>

playgrounds/browser-extension/entrypoints/background/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
1+
import { JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
22
import * as z from 'zod'
33

44
export type NewUser = z.infer<typeof NewUserSchema>

playgrounds/contract-first/src/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
1+
import { JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
22
import * as z from 'zod'
33

44
export type NewUser = z.infer<typeof NewUserSchema>

playgrounds/electron/src/main/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
1+
import { JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
22
import * as z from 'zod'
33

44
export type NewUser = z.infer<typeof NewUserSchema>

playgrounds/nest/src/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
1+
import { JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
22
import * as z from 'zod'
33

44
export type NewUser = z.infer<typeof NewUserSchema>

playgrounds/next/src/schemas/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { experimental_JSON_SCHEMA_REGISTRY as JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
1+
import { JSON_SCHEMA_REGISTRY } from '@orpc/zod/zod4'
22
import * as z from 'zod'
33

44
export type NewUser = z.infer<typeof NewUserSchema>

0 commit comments

Comments
 (0)