{"action":"opened","issue":{"url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/2665","repository_url":"https://api.github.com/repos/telefonicaid/fiware-orion","labels_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/2665/labels{/name}","comments_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/2665/comments","events_url":"https://api.github.com/repos/telefonicaid/fiware-orion/issues/2665/events","html_url":"https://github.com/telefonicaid/fiware-orion/issues/2665","id":189080933,"number":2665,"title":"in POST v2/op/update (batch op) entity type allows length longer than 256 chars","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":[{"id":222329396,"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/APIv2","name":"APIv2","color":"5319e7","default":false},{"id":56268043,"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/bug","name":"bug","color":"fc2929","default":true},{"id":59099862,"url":"https://api.github.com/repos/telefonicaid/fiware-orion/labels/P6","name":"P6","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-14T10:46:22Z","updated_at":"2016-11-14T10:46:22Z","closed_at":null,"body":"in POST v2/op/update (batch op) entity id allows length longer than 256 chars. See similar issue: #2659.\r\n\r\n#### update bacth operation request\r\n```\r\nurl: POST http://localhost:1026/v2/op/update\r\nheaders:\r\n    Content-Type: application/json\r\n    Fiware-Service: test_op_update_entities_type_error\r\n    Fiware-ServicePath: /test\r\npayload: {\"entities\": [{\"type\": \"zzSzwDmHxb6FqW1C159MhUvlBFH3mbVhoJ8c7NUzJjBL58smi9cI0Q0HmIEhFxeb3QNRXdJ8uWzu9SGW6SFmmV7WnIXjp76wITnecGAj2NUN0fAK4Io8wvD1kvvWL4KNa2RrF3ayNUGt6aLWvLKaiaML6fF8CEkbGmNtdIWslOUfE7bdc6IiZeYRID5mNZkAD5ssxDmvDfjBZsFscfqvpw3KmCCwUq14zJucjmKSG8ZviFV1FNH46MqlHBk0G6TuN\", \"temperature\": {\"type\": \"celsius\", \"value\": \"4\", \"metadata\": {\"alarm\": {\"type\": \"hot\", \"value\": \"warning\"}}}, \"id\": \"room_3\"}], \"actionType\": \"APPEND\"}\r\n\r\n```\r\n\r\n#### response\r\n```\r\nhttp code: 204 - No Content\r\nheaders:\r\n   Connection: Keep-Alive\r\n   Content-Length: 0\r\n   Fiware-Correlator: efb46f44-aa56-11e6-ba14-005056a20feb\r\n   Date: Mon, 14 Nov 2016 10:41:44 GMT\r\npayload:\r\n```\r\n\r\n#### Expected response\r\n```\r\nhttp code: 400 - Bad Request\r\n{\"error\":\"BadRequest\",\"description\":\"entity type length: 257, max length supported: 256\"}\r\n```\r\n\r\n#### doc in mongo\r\n```\r\n{ \"_id\" : { \"id\" : \"room_3\", \"type\" : \"zzSzwDmHxb6FqW1C159MhUvlBFH3mbVhoJ8c7NUzJjBL58smi9cI0Q0HmIEhFxeb3QNRXdJ8uWzu9SGW6SFmmV7WnIXjp76wITnecGAj2NUN0fAK4Io8wvD1kvvWL4KNa2RrF3ayNUGt6aLWvLKaiaML6fF8CEkbGmNtdIWslOUfE7bdc6IiZeYRID5mNZkAD5ssxDmvDfjBZsFscfqvpw3KmCCwUq14zJucjmKSG8ZviFV1FNH46MqlHBk0G6TuN\", \"servicePath\" : \"/test\" }, \"attrNames\" : [ \"temperature\" ], \"attrs\" : { \"temperature\" : { \"type\" : \"celsius\", \"creDate\" : 1479120104, \"modDate\" : 1479120104, \"value\" : \"4\", \"md\" : { \"alarm\" : { \"type\" : \"hot\", \"value\" : \"warning\" } }, \"mdNames\" : [ \"alarm\" ] } }, \"creDate\" : 1479120104, \"modDate\" : 1479120104 }\r\n```\r\n"}}
{"actor":{"display_login":"iariasleon"}}