Mongoose по умолчанию делает все поля не обязательными. Есть ли способ сделать все необходимые поля без изменения каждого из них:
Dimension = mongoose.Schema(
name: String
value: String
)
к
Dimension = mongoose.Schema(
name:
type: String
required: true
value:
type: String
required: true
)
Это будет очень уродливо, так как у меня их много.