我正在尝试将我的Orion Context Broker上的所有当前FIWARE数据模型(使用NGSIv2 API将POST数据导入Orion Context Broker实例)作为我的基础数据模型,但是当使用 repository of data models 中提供的精确json格式 - https://github.com/fiware/dataModels时 - 如下所示我的Restlet客户端出错:
{“error”:“BadRequest”,“description”:“属性必须是JSON对象,除非使用keyValues选项”}
这个Payload用于PointOfInterest但同样我也得到了其他FIWARE数据模型的相同错误:
POST http://localhost/v2/entities
Content-Type: application/json
{
"id": "PointOfInterest-A-Concha-123456",
"type": "PointOfInterest",
"name": "Playa de a Concha",
"description": "La Playa de A Concha se presenta como una continuación de la Playa de Compostela, una de las más frecuentadas de Vilagarcía.",
"address": {
"addressCountry": "ES",
"addressLocality": "Vilagarcía de Arousa"
},
"category": ["113"],
"location": {
"type": "Point",
"coordinates": [
-8.768460000000001,
42.60214472222222
]
},
"source": "http://www.tourspain.es",
"refSeeAlso": ["Beach-A-Concha-123456"]
}
简单地说,当FIWARE数据模型已经统一以便为不同的应用程序提供数据可移植性时,我想用我自己的数据将所有当前模型克隆到我的orion上下文代理,但不能使用存储库中提供的示例json模式 .
我能够在Orion上创建更简单的实体,但不能创建FIWARE DATA MODELS . 有谁知道我在做什么?
1 回答
尝试将
?options=keyVaues
添加到您的请求中,我的意思是使用: