diegohaz / rest

REST API generator with Node.js, Express and Mongoose
MIT License
1.79k stars 312 forks source link

How to add reference model #263

Open bhaireshm opened 3 years ago

bhaireshm commented 3 years ago

How to generate the below case??

If i want to add reference to a column for eaxmple:

User = { name: String, email: String, address: { type : mongoose.Type.ObjectId, ref: "Address" } }

kasumo-spec commented 3 years ago

U use

address: { type : Schema.ObjectId, ref: "Address" }