Replies: 3 comments 5 replies
-
If I get it right, you are looking for a way to convert the schema into a JSON tree? I think, this tree has to be quite verbose and should return the validation rules as well. So yeah, I would need a proper proposal on which format to follow. |
Beta Was this translation helpful? Give feedback.
-
Also we need to access schema on compiled validator (VineValidator), as most of the developers export the compiled validator instead of schema (which is recommended) |
Beta Was this translation helpful? Give feedback.
-
I see you are basically looking for a VineJS schema to JSON schema convertor, which is a little bit time-consuming task. I have added it to my Insiders todo-list. Meanwhile, I have added |
Beta Was this translation helpful? Give feedback.
-
I'm the developer of AutoSwagger.
We're trying to implement a feature to automatically describe a request body based on a validator.
Unfortunately we currently cannot parse the vine.object.
Would it be possible to add a
toJson()
function to the validator, that returns the object fields?Issue in question: ad-on-is/adonis-autoswagger#35 (comment)
Beta Was this translation helpful? Give feedback.
All reactions