db.runCommand( {
collMod: "whisky",
validator: {
$jsonSchema: {
bsonType: "object",
*required*: [ "name", "age" ],
properties: {
name: {
*bsonType*: "string",
description: "The name of the whisky.",
},
age: {
bsonType: "int",
*minimum: 3,*
description: "The age in years of the whisky".
}
}
}
},
} )