Missing version field by msailes · Pull Request #258 · aws/aws-lambda-java-libs

Issue #, if available:
#207

Description of changes:
This is a little complex due to the various different modes of operation around REST and HTTP APIs, with the old (v1) and new (v2) message formats.

  • REST APIs should use APIGatewayProxyRequestEvent a version won't be set. This doesn't cause a problem, but getVersion() does return a null.
  • HTTP APIs using v1 and the APIGatewayProxyRequestEvent will have "1.0" set for the version.
  • HTTP APIs using v2 and the APIGatewayProxyRequestEvent will have "2.0" set for the version.
  • HTTP APIs using v2 should use the APIGatewayV2HTTPEvent to take advantage of the changes.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.