{"action":"opened","issue":{"url":"https://api.github.com/repos/Sealious/Sealious/issues/237","labels_url":"https://api.github.com/repos/Sealious/Sealious/issues/237/labels{/name}","comments_url":"https://api.github.com/repos/Sealious/Sealious/issues/237/comments","events_url":"https://api.github.com/repos/Sealious/Sealious/issues/237/events","html_url":"https://github.com/Sealious/Sealious/issues/237","id":113067851,"number":237,"title":"Method PUT shouldn't create empty objects from fields which didn't exist","user":{"login":"debian-sh","id":5663277,"avatar_url":"https://avatars.githubusercontent.com/u/5663277?v=3","gravatar_id":"","url":"https://api.github.com/users/debian-sh","html_url":"https://github.com/debian-sh","followers_url":"https://api.github.com/users/debian-sh/followers","following_url":"https://api.github.com/users/debian-sh/following{/other_user}","gists_url":"https://api.github.com/users/debian-sh/gists{/gist_id}","starred_url":"https://api.github.com/users/debian-sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/debian-sh/subscriptions","organizations_url":"https://api.github.com/users/debian-sh/orgs","repos_url":"https://api.github.com/users/debian-sh/repos","events_url":"https://api.github.com/users/debian-sh/events{/privacy}","received_events_url":"https://api.github.com/users/debian-sh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-23T17:51:37Z","updated_at":"2015-10-23T17:51:37Z","closed_at":null,"body":"I've sent POST method with minimal body for create new resource (latitude=2 & longitude=3)\r\n\r\n```js\r\n{\r\n    \"id\": \"18es9cudfb\",\r\n    \"type\": \"places\",\r\n    \"body\": {\r\n        \"longitude\": 3,\r\n        \"latitude\": 2,\r\n        \"image\": \"/img/places/default.jpg\"\r\n    },\r\n    \"created_context\": {\r\n        \"timestamp\": 1445621649845,\r\n        \"ip\": \"127.0.0.1\",\r\n        \"user_id\": \"64ym4tumu9\"\r\n    }\r\n}\r\n```\r\nAfter creating new resource I've sent PUT method also with minimal body (latitude=2 & longitude=4) to the above resource.\r\n\r\n```js\r\n{\r\n    \"id\": \"18es9cudfb\",\r\n    \"type\": \"places\",\r\n    \"body\": {\r\n        \"name\": {},\r\n        \"address\": {},\r\n        \"city\": {},\r\n        \"country\": {},\r\n        \"longitude\": 4,\r\n        \"latitude\": 2,\r\n        \"image\": \"/img/places/default.jpg\",\r\n        \"image_name\": {},\r\n        \"access\": {}\r\n    },\r\n    \"created_context\": {\r\n        \"timestamp\": 1445621649845,\r\n        \"ip\": \"127.0.0.1\",\r\n        \"user_id\": \"64ym4tumu9\"\r\n    },\r\n    \"last_modified_context\": {\r\n        \"timestamp\": 1445621741729,\r\n        \"ip\": \"127.0.0.1\",\r\n        \"user_id\": \"64ym4tumu9\"\r\n    }\r\n}\r\n```\r\nStructure resource\r\n```js\r\nnew Sealious.ChipTypes.ResourceType({\r\n\tname: \"places\",\r\n\tfields: [\r\n\t\t{name: \"name\", type: \"text\"},\r\n\t\t{name: \"address\", type: \"text\"},\r\n\t\t{name: \"city\", type: \"text\"},\r\n\t\t{name: \"country\", type: \"text\"},\r\n\t\t{name: \"category\", type: \"category\"},\r\n\t\t{name: \"longitude\", type: \"float\", required: true}, //52\r\n\t\t{name: \"latitude\", type: \"float\", required: true},  //16\r\n\t\t{name: \"image\", type: \"file\", params: {no_file_value: \"/img/places/default.jpg\"}},\r\n\t\t{name: \"image_name\", type: \"text\"},\r\n\t\t{name: \"access\", type: \"access\"}\r\n\t],\r\n\taccess_strategy: {\r\n\t\tcreate : \"create_only_logged\",\r\n\t\tretrieve : \"retrieve_with_access\",\r\n\t\tdelete : \"create_only_logged\",\r\n\t\tupdate : \"create_only_logged\"\r\n\t}\r\n});\r\n"}}