{"action":"created","issue":{"url":"https://api.github.com/repos/firebase/bolt/issues/123","repository_url":"https://api.github.com/repos/firebase/bolt","labels_url":"https://api.github.com/repos/firebase/bolt/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/firebase/bolt/issues/123/comments","events_url":"https://api.github.com/repos/firebase/bolt/issues/123/events","html_url":"https://github.com/firebase/bolt/issues/123","id":128254384,"number":123,"title":"Validation rule for a Map that may also be null is not being generated correctly","user":{"login":"peterhav","id":1724223,"avatar_url":"https://avatars.githubusercontent.com/u/1724223?v=3","gravatar_id":"","url":"https://api.github.com/users/peterhav","html_url":"https://github.com/peterhav","followers_url":"https://api.github.com/users/peterhav/followers","following_url":"https://api.github.com/users/peterhav/following{/other_user}","gists_url":"https://api.github.com/users/peterhav/gists{/gist_id}","starred_url":"https://api.github.com/users/peterhav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterhav/subscriptions","organizations_url":"https://api.github.com/users/peterhav/orgs","repos_url":"https://api.github.com/users/peterhav/repos","events_url":"https://api.github.com/users/peterhav/events{/privacy}","received_events_url":"https://api.github.com/users/peterhav/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/firebase/bolt/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-01-22T21:48:29Z","updated_at":"2016-08-04T21:28:03Z","closed_at":"2016-08-04T21:28:03Z","body":"I have a bolt file containing the following attribute inside a type definition:\r\n\r\n```javascript\r\nownedEvents:Map<KeyString, Boolean>|Null\r\n```\r\n\r\nThe generated rules file contains a validation that does not comply with this statement:\r\n\r\n```javascript\r\n\"ownedEvents\": {\r\n          \"$key2\": {\r\n            \".validate\": \"$key2.length > 0 && $key2.length <= 255 && newData.isBoolean()\"\r\n          },\r\n          \".validate\": \"newData.val() == null\"\r\n        },\r\n```\r\n\r\nThe .validate of \"ownedEvents\" is incorrect: it does not allow creation of the list."},"comment":{"url":"https://api.github.com/repos/firebase/bolt/issues/comments/237689001","html_url":"https://github.com/firebase/bolt/issues/123#issuecomment-237689001","issue_url":"https://api.github.com/repos/firebase/bolt/issues/123","id":237689001,"user":{"login":"mckoss","id":82750,"avatar_url":"https://avatars.githubusercontent.com/u/82750?v=3","gravatar_id":"","url":"https://api.github.com/users/mckoss","html_url":"https://github.com/mckoss","followers_url":"https://api.github.com/users/mckoss/followers","following_url":"https://api.github.com/users/mckoss/following{/other_user}","gists_url":"https://api.github.com/users/mckoss/gists{/gist_id}","starred_url":"https://api.github.com/users/mckoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mckoss/subscriptions","organizations_url":"https://api.github.com/users/mckoss/orgs","repos_url":"https://api.github.com/users/mckoss/repos","events_url":"https://api.github.com/users/mckoss/events{/privacy}","received_events_url":"https://api.github.com/users/mckoss/received_events","type":"User","site_admin":false},"created_at":"2016-08-04T21:28:03Z","updated_at":"2016-08-04T21:28:03Z","body":"Fixed by #167 "}}
{"actor":{"display_login":"mckoss"}}