扬鞭定义可以包含JSON引用($ REF),例如:
{"paths": {
"/malts": {
"get": {
"responses": {
"200": {
"schema": {
"$ref": "#/definitions/Malt"
}
}
}
}
}
}
存储在MongoDB中这个JSON对象似乎工作,但后来在更新时,我得到以下错误:
MongoError: The DBRef $ref field must be following by a $id field
这是否真的意味着JSON引用不能被储存在MongoDB中,因为蒙戈使用$裁判也为their internal database reference?
我使用的蒙戈快车(HTTPS的最新版本: //github.com/andzdroid/mongo-express) – pfust75