swift-server / swift-aws-lambda-runtime

Swift implementation of AWS Lambda Runtime
Apache License 2.0
1.13k stars 102 forks source link

ClientContext should be a type, not String #169

Open ktoso opened 3 years ago

ktoso commented 3 years ago

Expected behavior

The ClientContext is often of well known shape:

It should handle the typing more gracefully I think, see docs: https://docs.aws.amazon.com/lambda/latest/dg/nodejs-context.html

See also: https://github.com/swift-server/swift-aws-lambda-runtime/pull/167#discussion_r489236665 for discussion on this

Actual behavior

It's a String today:

            let clientContext: String?