Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fleece assumes a specific format for API Gateway request templates #36

Open
larsbutler opened this issue Jun 7, 2017 · 1 comment
Open

Comments

@larsbutler
Copy link
Contributor

The recent addition of connexion utilities added some nice utilities for integrating Connexion/WSGI apps and API gateway. At the core of this integration lies the construction of the WSGI environment, which a WSGI app needs in order to execute.

The problem is, the environment construction assumes a lot about the content of the event object which is passed to the Lambda handler function. For example, the _build_wsgi_env function assumes that event contains a rawContext object. The events module also assumes a specific layout of the API Gateway request template, which completely depends on how the application is deployed.

The request template format assumed by fleece is that which is used by default by yoke, but to someone who doesn't already know that, it's not obvious. :)

The solutions I propose are:

  • Document the expected request template details better and provide guidelines for developers who want to use these utilities. (Bare minimum.)
  • Provide a way to specify to fleece some details about the request template so fleece can make the appropriate mappings. (Nice to have.)
@szilveszter
Copy link
Member

The bare minimum is already in place (but could be improved of course), it's in the connexion section of the README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants