I am using mongoose 5.3.6
and I am trying to share a common set of schema attributes for a model question, then based on a discriminator, use a schema that adds to the base schema.
The following schema is the working schema, where all question models have the samea attributes:
var SurveyQuestion = new Schema({
questionId: {type: Number, required: true},
question: {type: String, required: true, index: true},
...
}, {_id: false, versionKey: false});