Using $refs in zodios-openapi #265
epotter2297
started this conversation in
Ideas
Replies: 2 comments 3 replies
-
Yes, i'll try to activate it and check if the issues are now fixed with zodios |
Beta Was this translation helpful? Give feedback.
1 reply
-
@epotter2297 Any way you were able to get reference definitions with |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I see in zodios-openapi that
$refStrategy: "none"
is set when creating openapi definitions from our zod schemas. I was curious, is it possible for this to work usingroot
instead?The reason I ask is because I have some recursive schemas defined with zod that I would like to show up properly in openapi, but that can only work via a $ref. It looks like
zod-to-json-schema
greatly improved their recursive schema support in their recent3.20
version, so that half of the problem is already solved for us 🙂If that can't work for whatever reason, the same end result could be achieved if I had a way of telling
openApiBuilder
what my recursive schemas are.Maybe something like:
Which would then add
myRecursiveZodSchema
as a ref, and also allow it to be passed in as adefinition
to themakeJsonSchema()
function in zodios-openapi.Beta Was this translation helpful? Give feedback.
All reactions