[英]Error registering Weather Forcast data model (NGSI v2)
我正在嘗試在ContextBroker
V1.5.0上注冊天氣預報,但出現以下錯誤:-
400錯誤的請求{“錯誤”:“ BadRequest”,“描述”:“屬性必須是JSON對象,除非使用keyValues選項”“
請求:POST http:// [ContextBroker IP]:1026 / v2 / entities
請求標頭:Content-Type:application / json
這是有效載荷
{
"feelsLikeTemperature":31.8,
"dayMinimum":{"feelsLikeTemperature":31.8,"temperature":0.0,"relativeHumidity":31.0},
"temperature":0.0,
"dateCreated":"2016-12-01T12:05:00+05:30",
"type":"WeatherForecast",
"address":{"addressCountry":"IN","postalCode":"452001","addressLocality":"Indore"},
"windSpeed":3.7,
"validity":{"to":"2016-12-01T06:44:37Z","from":"2016-12-01T06:44:37Z"},
"source":"http://dataservice.accuweather.com/",
"precipitationProbability":0,
"dayMaximum":{"feelsLikeTemperature":31.8,"temperature":0.0,"relativeHumidity":31.0},
"weatherType":"Partly sunny",
"windDirection":"ENE",
"id":"452001_IN_YYYY-12-DD ",
"relativeHumidity":31.0
}
我在http://fiware-datamodels.readthedocs.io/en/latest/Weather/WeatherForecast/doc/spec/index.html上使用FIWARE
數據模型進行了驗證,但似乎無法正常工作。 有人知道解決這個問題的方法嗎?
您正在使用'keyValues'表示形式,因此需要使用?options = keyValues進行POST
順便說一下,WeatherForecast數據模型剛剛進行了更新,並進行了一些調整以符合GSMA規范。
http://fiware-datamodels.readthedocs.io/en/latest/Weather/WeatherForecast/doc/spec/index.html
謝謝!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.