Skip to content

Commit

Permalink
Merge pull request #73 from iway1/bug/zod-to-json-refs
Browse files Browse the repository at this point in the history
now uses : 'none' to prevent issues with zodToJsonSchema
  • Loading branch information
iway1 authored Apr 25, 2023
2 parents 0629a0e + 5a4f297 commit 65249f6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/trpc-panel/src/parse/parseProcedure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ function nodeAndInputSchemaFromInputs(
if (!inputs.length) {
return {
parseInputResult: "success",
schema: zodToJsonSchema(emptyZodObject, { errorMessages: true }),
schema: zodToJsonSchema(emptyZodObject, {
errorMessages: true,
$refStrategy: "none",
}),
node: inputParserMap["zod"](emptyZodObject, {
path: [],
options,
Expand All @@ -84,7 +87,10 @@ function nodeAndInputSchemaFromInputs(

return {
parseInputResult: "success",
schema: zodToJsonSchema(input as any, { errorMessages: true }), //
schema: zodToJsonSchema(input as any, {
errorMessages: true,
$refStrategy: "none",
}), //
node: zodSelectorFunction((input as any)._def, {
path: [],
options,
Expand Down

0 comments on commit 65249f6

Please sign in to comment.