I have a complex Json Schema having properties and their definitions, I know the root property, Using jsonSchema4, how can I create the complete object for the root property that includes its nested dependencies as well.
Asked
Active
Viewed 321 times
2 Answers
0
You mean how to write JSON schemas easier, right? You may use joi-to-json-schema

anhldbk
- 4,559
- 5
- 29
- 37
-
Thanks for your response, I meant, I already had the JSON Schema, I want to create the object out of that schema, I know the root element within the schema, now I need to traverse from the root element to each and every dependencies and create the object. The one you suggested talks about creating the Schema. – Umesh Kanyal Dec 16 '16 at 01:24
-
@UmeshKanyal: Well, personally I will use [mongoose schema](http://mongoosejs.com/docs/guide.html) to create a model (or the object ) to work with. To convert json-schema to mongoose schema, you may use [mongoose-from-json-schema](https://github.com/work-in-progress/mongoose-from-json-schema). Is that ok for you? – anhldbk Dec 16 '16 at 02:28