#4, refactor: add Rack env builder#6
#4, refactor: add Rack env builder#6requiemformemories wants to merge 2 commits intoelct9620:mainfrom
Conversation
f8c89e7 to
0979521
Compare
|
@requiemformemories please rebase |
0979521 to
b009e1d
Compare
There was a problem hiding this comment.
Please specify the correct types.
b009e1d to
a767ce5
Compare
|
Thanks for the review. I made up for the RBS types and I also used another way to transform the headers. |
| ::Hanami::Lambda::LAMBDA_EVENT => event, | ||
| ::Hanami::Lambda::LAMBDA_CONTEXT => context | ||
| }.tap do |env| | ||
| content_type = headers.delete("Content-Type") || |
There was a problem hiding this comment.
To get "content-type" with different keys because all values are possibly received from Lambda event. We should not change it.
sig/hanami/lambda/env.rbs
Outdated
| # | ||
| # @return [Hash] the hash of Rack environment | ||
| # | ||
| def to_h: () -> ::Hash[String, untyped] |
There was a problem hiding this comment.
Is it possible to use "allowlist" to list all possible hash value instead "untyped"
|
Currently I am facing some difficulties with type checking. (1) (2) In the source code we have (3) |
(1)
|
Description
The Rack env build method is too large that hard to extend new behaviors. Add Hanami::Lambda::Env to improve it.
Related Issues