{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/1992","repository_url":"https://api.github.com/repos/serverless/serverless","labels_url":"https://api.github.com/repos/serverless/serverless/issues/1992/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/1992/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/1992/events","html_url":"https://github.com/serverless/serverless/pull/1992","id":174306593,"number":1992,"title":"Fix #1168: add ability to specify request pass through behavior for …","user":{"login":"anreved","id":4683137,"avatar_url":"https://avatars.githubusercontent.com/u/4683137?v=3","gravatar_id":"","url":"https://api.github.com/users/anreved","html_url":"https://github.com/anreved","followers_url":"https://api.github.com/users/anreved/followers","following_url":"https://api.github.com/users/anreved/following{/other_user}","gists_url":"https://api.github.com/users/anreved/gists{/gist_id}","starred_url":"https://api.github.com/users/anreved/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anreved/subscriptions","organizations_url":"https://api.github.com/users/anreved/orgs","repos_url":"https://api.github.com/users/anreved/repos","events_url":"https://api.github.com/users/anreved/events{/privacy}","received_events_url":"https://api.github.com/users/anreved/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-31T15:37:41Z","updated_at":"2016-09-01T05:10:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/serverless/serverless/pulls/1992","html_url":"https://github.com/serverless/serverless/pull/1992","diff_url":"https://github.com/serverless/serverless/pull/1992.diff","patch_url":"https://github.com/serverless/serverless/pull/1992.patch"},"body":"***Implementing Issue:*** #1168 \r\n\r\n## What did you implement:\r\nAdded ability to specify a pass-through behavior for API Gateway requests.  It requires that you select one of the valid methods (NEVER, WHEN_NO_MATCH, WHEN_NO_TEMPLATES), and uses NEVER as the default value if none was specified.\r\n\r\n## How did you implement it:\r\nI updated the apiGateway events method processing to include a check for the \"passThrough\" configuration.  If none specified, it will use the default value.  If an invalid value is passed, an error will be thrown.\r\n\r\n## How can we verify it:\r\nUpdate your function config under events.http.request to include a \"passThrough\" value.\r\n\r\n```yml\r\nfunctions:\r\n  create:\r\n    handler: posts.create\r\n    events:\r\n      - http:\r\n          method: get\r\n          path: whatever\r\n          request:\r\n            passThrough: WHEN_NO_TEMPLATES\r\n```\r\n\r\nYou can verify that the resulting CloudFormation template under Integration -> PassthroughBehavior has the correct value.\r\n \r\nOnce deployed, you can confirm in the API Gateway dashboard under that method -> Integration Request -> Body Mapping Templates.\r\n\r\n## Todos:\r\n\r\n- [ X ] Write tests\r\n- [ X ] Fix linting errors\r\n- [ X ] Provide verification config/commands/resources\r\n\r\n…API Gateway"},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/243977622","html_url":"https://github.com/serverless/serverless/pull/1992#issuecomment-243977622","issue_url":"https://api.github.com/repos/serverless/serverless/issues/1992","id":243977622,"user":{"login":"flomotlik","id":132653,"avatar_url":"https://avatars.githubusercontent.com/u/132653?v=3","gravatar_id":"","url":"https://api.github.com/users/flomotlik","html_url":"https://github.com/flomotlik","followers_url":"https://api.github.com/users/flomotlik/followers","following_url":"https://api.github.com/users/flomotlik/following{/other_user}","gists_url":"https://api.github.com/users/flomotlik/gists{/gist_id}","starred_url":"https://api.github.com/users/flomotlik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flomotlik/subscriptions","organizations_url":"https://api.github.com/users/flomotlik/orgs","repos_url":"https://api.github.com/users/flomotlik/repos","events_url":"https://api.github.com/users/flomotlik/events{/privacy}","received_events_url":"https://api.github.com/users/flomotlik/received_events","type":"User","site_admin":false},"created_at":"2016-09-01T05:10:44Z","updated_at":"2016-09-01T05:10:44Z","body":"Hey @anreved , thanks for the PR. This all looks great, one addition to the docs, but other than that great job!"}}
{"actor":{"display_login":"flomotlik"}}