stashimi / serverless

Inofficial fork of the Serverless Framework with the intent of keeping backward compatibility to the 0.5.x release while adding new features and bug fixes
http://www.serverless.com
Other
0 stars 0 forks source link

Deprecate the use of `requestParameters` in the APIG Endpoint definition #1

Closed arabold closed 8 years ago

arabold commented 8 years ago

The deployment of API Gateway endpoints is oddly broken in Serverless 0.5.6. It is important to distinguish between request parameters for the method request and for the integration request. This PR replaces the existing requestParameters configuration option with two new ones:

This adds missing functionality to Serverless to declare input parameters being optional and to hardcode integration parameters to certain values. Both parameters work exactly as defined in the APIG documentation:

methodRequestParameters

Mapping of request parameters in the form of method.request.{location}.{name} to boolean values. true sets the parameter to being required, false sets it to being optional.

integrationRequestParameters

Mapping of integration request parameters in the form of (integration.request.{location}.{name}) to either the method request parameters (method.request.{location}.{name}) or to static values ('some value' enclosed in single quotes).

HyperBrain commented 8 years ago

Looks good.