8000 fix(zod): Target `openapi-3.0` when generating the JSON schema · aklinker1/zeta@f3a36a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f3a36a9

Browse files
committed
fix(zod): Target openapi-3.0 when generating the JSON schema
1 parent 33658c9 commit f3a36a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/adapters/zod-schema-adapter.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const { z } = await import(zod);
2121
export const zodSchemaAdapter: SchemaAdapter = {
2222
toJsonSchema: (schema) => {
2323
if (!("_zod" in schema)) throw Error("input schema is not a Zod schema");
24-
const res = z.toJSONSchema(schema, { target: "draft-7" });
24+
const res = z.toJSONSchema(schema, { target: "openapi-3.0" });
2525
delete res.$schema;
2626
return res;
2727
},

0 commit comments

Comments
 (0)
0