{"action":"closed","issue":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1438","repository_url":"https://api.github.com/repos/telefonicaid/fiware-orion","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1438/labels{/name}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1438/comments","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/1438/events","html_url":"https://github.com/telefonicaid/fiware-orion/issues/1438","id":113825179,"number":1438,"title":"[BUG] in PUT /v2/entities/<id>/attrs/<attr_name> is possible to append a metadata with blank name","user":{"login":"iariasleon","id":4330098,"avatar_url":"https://avatars.githubusercontent.com/u/4330098?v=3","gravatar_id":"","url":"https://api.github.com/users/iariasleon","html_url":"https://github.com/iariasleon","followers_url":"https://api.github.com/users/iariasleon/followers","following_url":"https://api.github.com/users/iariasleon/following{/other_user}","gists_url":"https://api.github.com/users/iariasleon/gists{/gist_id}","starred_url":"https://api.github.com/users/iariasleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iariasleon/subscriptions","organizations_url":"https://api.github.com/users/iariasleon/orgs","repos_url":"https://api.github.com/users/iariasleon/repos","events_url":"https://api.github.com/users/iariasleon/events{/privacy}","received_events_url":"https://api.github.com/users/iariasleon/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/APIv2","name":"APIv2","color":"5319e7"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/P6","name":"P6","color":"0052cc"}],"state":"closed","locked":false,"assignee":{"login":"iariasleon","id":4330098,"avatar_url":"https://avatars.githubusercontent.com/u/4330098?v=3","gravatar_id":"","url":"https://api.github.com/users/iariasleon","html_url":"https://github.com/iariasleon","followers_url":"https://api.github.com/users/iariasleon/followers","following_url":"https://api.github.com/users/iariasleon/following{/other_user}","gists_url":"https://api.github.com/users/iariasleon/gists{/gist_id}","starred_url":"https://api.github.com/users/iariasleon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iariasleon/subscriptions","organizations_url":"https://api.github.com/users/iariasleon/orgs","repos_url":"https://api.github.com/users/iariasleon/repos","events_url":"https://api.github.com/users/iariasleon/events{/privacy}","received_events_url":"https://api.github.com/users/iariasleon/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/23","html_url":"https://github.com/telefonicaid/fiware-orion/milestones/1.0.0","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/milestones/23/labels","id":1437095,"number":23,"title":"1.0.0","description":"","creator":{"login":"fgalan","id":1534240,"avatar_url":"https://avatars.githubusercontent.com/u/1534240?v=3","gravatar_id":"","url":"https://api.github.com/users/fgalan","html_url":"https://github.com/fgalan","followers_url":"https://api.github.com/users/fgalan/followers","following_url":"https://api.github.com/users/fgalan/following{/other_user}","gists_url":"https://api.github.com/users/fgalan/gists{/gist_id}","starred_url":"https://api.github.com/users/fgalan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fgalan/subscriptions","organizations_url":"https://api.github.com/users/fgalan/orgs","repos_url":"https://api.github.com/users/fgalan/repos","events_url":"https://api.github.com/users/fgalan/events{/privacy}","received_events_url":"https://api.github.com/users/fgalan/received_events","type":"User","site_admin":false},"open_issues":37,"closed_issues":7,"state":"open","created_at":"2015-12-01T10:17:23Z","updated_at":"2016-03-01T13:49:41Z","due_on":"2016-03-30T22:00:00Z","closed_at":null},"comments":4,"created_at":"2015-10-28T13:51:29Z","updated_at":"2016-03-01T13:49:42Z","closed_at":"2016-03-01T13:49:41Z","body":"#### Create request:\r\n```\r\nPOST http://localhost:1026/v2/entities\r\nContent-Type: application/json\r\n Fiware-Service: test_attribute_metadata_name_update_error\r\nFiware-ServicePath: /test\r\n{\"type\": \"house\", \"temperature\": \"84\", \"id\": \"room\"}\r\n```\r\n\r\n#### Update request:\r\n```\r\nPUT http://localhost:1026/v2/entities/room/attrs/temperature\r\nContent-Type: application/json\r\nFiware-Service: test_attribute_metadata_name_update_error\r\nFiware-ServicePath: /test\r\n {\"\": \"5678\"}\r\n```\r\n\r\n#### Update response:\r\n```\r\nhttp code: 204\r\ncontent-length: 0\r\n```\r\n\r\n#### docs in mongo:\r\n```\r\n{ \r\n      \"_id\" : { \"id\" : \"room\", \"type\" : \"house\", \"servicePath\" : \"/test\" }, \r\n      \"attrNames\" : [ \"temperature\" ], \r\n      \"attrs\" : { \r\n             \"temperature\" : { \r\n                      \"value\" : \"84\", \r\n                      \"type\" : \"\", \r\n                      \"md\" : [\r\n                              { \"name\" : \"\", \"value\" : \"5678\" } ], \r\n                      \"creDate\" : 1446039877, \r\n                      \"modDate\" : 1446039877 } }, \r\n      \"creDate\" : 1446039877, \r\n      \"modDate\" : 1446039877 \r\n}\r\n```\r\nAnother example with metadata type:\r\n```\r\n{ \r\n       \"_id\" : { \"id\" : \"room_2\", \"type\" : \"house\", \"servicePath\" : \"/test\" }, \r\n       \"attrNames\" : [ \"temperature\" ], \r\n       \"attrs\" : { \r\n              \"temperature\" : { \r\n                        \"value\" : \"84\", \r\n                        \"type\" : \"\", \r\n                        \"md\" : [ \r\n                                 { \"name\" : \"\", \"type\" : \"celcius\", \"value\" : \"5678\" } ], \r\n                        \"creDate\" : 1446040377, \r\n                        \"modDate\" : 1446040377 } }, \r\n       \"creDate\" : 1446040377, \r\n       \"modDate\" : 1446040377 \r\n}\r\n```"}}