我正在使用Compass的验证标签手动在下面输入$ jsonSchema验证。 不幸的是,它一直显示错误“未知的$ jsonSchema关键字:geometry”
由于将几何图形用作键,因此不确定为什么会显示此错误。
请问我如何纠正此问题的任何建议?
{
$jsonSchema: {
bsonType: "object",required: ["properties.Name","properties.Country","geometry.type","geometry.coordinates"],properties:{
Country: {
bsonType: "string",description: "Must be supplied"
},Name: {
bsonType: "string",description: {
bsonType: "string",description: "Optional description"
}
},geometry: {
type: {
bsonType: "string",enum: ["Point"],description: "Must be Point"
},coordinates: {
bsonType: ["double"],description: "Longitude,Latitude"
}
},datePosted: {
bsonType: "date",description: "Auto-added field"
},image: {
bsonType: "string",description: "URL of image location"
}
}
}