Skip to content

Commit e2d72af

Browse files
authored
Loosen and expand metadata typing (#4586)
1 parent 9126782 commit e2d72af

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

packages/zod/src/v4/core/registries.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,19 +66,12 @@ export interface JSONSchemaMeta {
6666
id?: string | undefined;
6767
title?: string | undefined;
6868
description?: string | undefined;
69-
examples?: $output[] | undefined;
69+
example?: unknown | undefined;
70+
examples?: unknown[] | Record<string, { value: unknown; [k: string]: unknown }> | undefined; // allow array or example map
71+
deprecated?: boolean | undefined;
7072
[k: string]: unknown;
7173
}
7274

73-
// export class $ZodJSONSchemaRegistry<
74-
// Meta extends JSONSchemaMeta = JSONSchemaMeta,
75-
// Schema extends $ZodType = $ZodType,
76-
// > extends $ZodRegistry<Meta, Schema> {
77-
// toJSONSchema(_schema: Schema): object {
78-
// return {};
79-
// }
80-
// }
81-
8275
export interface GlobalMeta extends JSONSchemaMeta {}
8376

8477
// registries

0 commit comments

Comments
 (0)