{"action":"created","issue":{"url":"https://api.github.com/repos/typestack/class-validator/issues/118","repository_url":"https://api.github.com/repos/typestack/class-validator","labels_url":"https://api.github.com/repos/typestack/class-validator/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/typestack/class-validator/issues/118/comments","events_url":"https://api.github.com/repos/typestack/class-validator/issues/118/events","html_url":"https://github.com/typestack/class-validator/pull/118","id":255893025,"number":118,"title":"Validating unwanted additional properties","user":{"login":"aljazerzen","id":11072061,"avatar_url":"https://avatars2.githubusercontent.com/u/11072061?v=4","gravatar_id":"","url":"https://api.github.com/users/aljazerzen","html_url":"https://github.com/aljazerzen","followers_url":"https://api.github.com/users/aljazerzen/followers","following_url":"https://api.github.com/users/aljazerzen/following{/other_user}","gists_url":"https://api.github.com/users/aljazerzen/gists{/gist_id}","starred_url":"https://api.github.com/users/aljazerzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljazerzen/subscriptions","organizations_url":"https://api.github.com/users/aljazerzen/orgs","repos_url":"https://api.github.com/users/aljazerzen/repos","events_url":"https://api.github.com/users/aljazerzen/events{/privacy}","received_events_url":"https://api.github.com/users/aljazerzen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2017-09-07T10:39:26Z","updated_at":"2017-12-01T17:57:09Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/typestack/class-validator/pulls/118","html_url":"https://github.com/typestack/class-validator/pull/118","diff_url":"https://github.com/typestack/class-validator/pull/118.diff","patch_url":"https://github.com/typestack/class-validator/pull/118.patch"},"body":"As discussed [here](https://github.com/pleerock/routing-controllers/issues/200) I only solution to unwanted additional properties is to add a decorator to all wanted properties. I know this can become messy, but for now, it is better than nothing. If in the future Typescript will indeed set all properties to undefined, we can upgrade this without breaking any code written using `@Allowed` decorator.\r\n\r\nBecause this is a **validator**-class `@Allowed` is not stripping additional properties, but throwing a validation error. Should we add an option to strip instead?\r\n\r\nI have tried to use formatting style used in this repo, I hope I did a good job :)"},"comment":{"url":"https://api.github.com/repos/typestack/class-validator/issues/comments/348563700","html_url":"https://github.com/typestack/class-validator/pull/118#issuecomment-348563700","issue_url":"https://api.github.com/repos/typestack/class-validator/issues/118","id":348563700,"user":{"login":"aljazerzen","id":11072061,"avatar_url":"https://avatars2.githubusercontent.com/u/11072061?v=4","gravatar_id":"","url":"https://api.github.com/users/aljazerzen","html_url":"https://github.com/aljazerzen","followers_url":"https://api.github.com/users/aljazerzen/followers","following_url":"https://api.github.com/users/aljazerzen/following{/other_user}","gists_url":"https://api.github.com/users/aljazerzen/gists{/gist_id}","starred_url":"https://api.github.com/users/aljazerzen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aljazerzen/subscriptions","organizations_url":"https://api.github.com/users/aljazerzen/orgs","repos_url":"https://api.github.com/users/aljazerzen/repos","events_url":"https://api.github.com/users/aljazerzen/events{/privacy}","received_events_url":"https://api.github.com/users/aljazerzen/received_events","type":"User","site_admin":false},"created_at":"2017-12-01T17:57:09Z","updated_at":"2017-12-01T17:57:09Z","author_association":"NONE","body":"I have implemented stripping of the additional properties and added flag for throwing an error. (sorry it took me this long). "}}
{"actor":{"display_login":"aljazerzen"}}