1{
2 "title": {
3 "type": "String",
4 "trim": true,
5 "index": true,
6 "required": true
7 },
8 "year": {
9 "type": "Number",
10 "max": 2012,
11 "validate": "validateBookYear"
12 },
13 "author": {
14 "type": "ObjectId",
15 "ref": "Author",
16 "index": true,
17 "required": true
18 }
19}