{"action":"created","issue":{"url":"https://api.github.com/repos/interagent/committee/issues/99","repository_url":"https://api.github.com/repos/interagent/committee","labels_url":"https://api.github.com/repos/interagent/committee/issues/99/labels{/name}","comments_url":"https://api.github.com/repos/interagent/committee/issues/99/comments","events_url":"https://api.github.com/repos/interagent/committee/issues/99/events","html_url":"https://github.com/interagent/committee/pull/99","id":175708470,"number":99,"title":"Optionally coerce query params","user":{"login":"michaelsauter","id":215455,"avatar_url":"https://avatars.githubusercontent.com/u/215455?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsauter","html_url":"https://github.com/michaelsauter","followers_url":"https://api.github.com/users/michaelsauter/followers","following_url":"https://api.github.com/users/michaelsauter/following{/other_user}","gists_url":"https://api.github.com/users/michaelsauter/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsauter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsauter/subscriptions","organizations_url":"https://api.github.com/users/michaelsauter/orgs","repos_url":"https://api.github.com/users/michaelsauter/repos","events_url":"https://api.github.com/users/michaelsauter/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsauter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-09-08T09:37:33Z","updated_at":"2016-09-08T20:03:34Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/interagent/committee/pulls/99","html_url":"https://github.com/interagent/committee/pull/99","diff_url":"https://github.com/interagent/committee/pull/99.diff","patch_url":"https://github.com/interagent/committee/pull/99.patch"},"body":"Implementation of https://github.com/interagent/committee/issues/97#issuecomment-244687060.\r\n\r\nI also added a note to the readme about the rules of this coercion. Not sure if this is enough and easy to understand, but it's a start.\r\n\r\nI also had to change the link in the schema from `/apps/search` to `/search/apps` because `/apps/search` was shadowed by `/apps/{(%23%2Fdefinitions%2Fapp%2Fdefinitions%2Fname)}`. I chose to use the search example for the tests because that is also our use case - passing query values to a search endpoint, e.g. `per_page` which should be an integer."},"comment":{"url":"https://api.github.com/repos/interagent/committee/issues/comments/245722213","html_url":"https://github.com/interagent/committee/pull/99#issuecomment-245722213","issue_url":"https://api.github.com/repos/interagent/committee/issues/99","id":245722213,"user":{"login":"michaelsauter","id":215455,"avatar_url":"https://avatars.githubusercontent.com/u/215455?v=3","gravatar_id":"","url":"https://api.github.com/users/michaelsauter","html_url":"https://github.com/michaelsauter","followers_url":"https://api.github.com/users/michaelsauter/followers","following_url":"https://api.github.com/users/michaelsauter/following{/other_user}","gists_url":"https://api.github.com/users/michaelsauter/gists{/gist_id}","starred_url":"https://api.github.com/users/michaelsauter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaelsauter/subscriptions","organizations_url":"https://api.github.com/users/michaelsauter/orgs","repos_url":"https://api.github.com/users/michaelsauter/repos","events_url":"https://api.github.com/users/michaelsauter/events{/privacy}","received_events_url":"https://api.github.com/users/michaelsauter/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T20:03:34Z","updated_at":"2016-09-08T20:03:34Z","body":"@brandur Thanks for the quick review!\r\n\r\nYes, you're correct that it just merges in coerced values. So if coercion fails, the original value is going to be validated which should fail (I chose to do it that way to not have to manually raise validation errors). There's a basic integration test already in https://github.com/michaelsauter/committee/blob/a1f87d7075e11dca9f146bd6ed333aaa96725699/test/middleware/request_validation_test.rb#L97. Did you see that? Or would you like to test another case? Happy to add another one."}}
{"actor":{"display_login":"michaelsauter"}}