title: How to validate list in mongodb schema?
body: <p>I'm creating HOME collection validation where I have rooms type(double, single, ensuite) and validation should allow adding all items listed.</p>
  
  <pre><code>"rooms.type": {bsonType: ["ensuite", "double", "single"]},
  </code></pre>
  
  <p>This is what I have in the validator</p>
  
  <pre><code>db.createCollection("home", { 
  validator : {
      $jsonSchema : {
      bsonType: "object",
      required: ["address.line1", "address.town", "rooms.type", 
      "rooms.qty", "rooms.price"],
   properties: {
      "address.line1": {bsonType: "string"},
      "address.town": {bsonType: "string"},
      "rooms.type": {bsonType: ["ensuite", "double", "single"]},
      "rooms.qty": {bsonType: "int", minimum: 0},
      "rooms.price": {bsonType: ["double"], minimum: 0},
  }}}})
  </code></pre>
  
  <p>I'm getting an error that </p>
  
  <pre><code>"ok" : 0,
  "errmsg" : "Unknown type name alias: ensuite",
  "code" : 2,
  "codeName" : "BadValue"
  </code></pre>
  
  <p>I expect array room.type to allow one or all attributes in the group specified in the schema.</p>