Using Zod to validate a single field of an object from an open api schema #2605
Unanswered
ballcoach12
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to know if it's feasible to use Zod to validate a proposed value for a property that is defined in an Open API schema. An example would be, given the following schema definition:
I want to return
true/false
for a proposed string value for theid
field.To do this, I would imagine that I need to take the following steps:
Device
object without having to know the Zod schema up frontschema.parse('id':<proposed_value>)
My questions are:
Thanks
Beta Was this translation helpful? Give feedback.
All reactions