From 2db9034ef5059bf12bb775eaf96880a9250bbb71 Mon Sep 17 00:00:00 2001 From: Patrick Brandt Date: Mon, 15 Aug 2016 09:49:12 -0400 Subject: [PATCH] updating docs per PR #1850 --- docs/guide/overview-of-event-sources.md | 1 + lib/plugins/aws/deploy/compile/events/apiGateway/README.md | 2 +- lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/guide/overview-of-event-sources.md b/docs/guide/overview-of-event-sources.md index 6a46a6e74..e7484a75d 100644 --- a/docs/guide/overview-of-event-sources.md +++ b/docs/guide/overview-of-event-sources.md @@ -109,6 +109,7 @@ in the `event` object: - body - method - principalId +- stage - headers - query - path diff --git a/lib/plugins/aws/deploy/compile/events/apiGateway/README.md b/lib/plugins/aws/deploy/compile/events/apiGateway/README.md index 1c5515b91..8b413761a 100644 --- a/lib/plugins/aws/deploy/compile/events/apiGateway/README.md +++ b/lib/plugins/aws/deploy/compile/events/apiGateway/README.md @@ -18,7 +18,7 @@ Those resources are then merged into the `serverless.service.resources.Resources ## Universal JSON request template -The API Gateway plugin implements a request template which provides `{body, method, principalId, headers, query, path, identity, +The API Gateway plugin implements a request template which provides `{body, method, principalId, stage, headers, query, path, identity, stageVariables} = event` as JavaScript objects. This way you don't have to define the template on your own but can use this default template to access the necessary variables in your code. diff --git a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js index 5945e7413..f4b8aa501 100644 --- a/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js +++ b/lib/plugins/aws/deploy/compile/events/apiGateway/lib/methods.js @@ -86,7 +86,7 @@ module.exports = { // universal velocity template // provides - // `{body, method, principalId, headers, query, path, identity, stageVariables} = event` + // `{body, method, principalId, stage, headers, query, path, identity, stageVariables} = event` // as js objects const DEFAULT_JSON_REQUEST_TEMPLATE = ` #define( $loop )