Skip to content

Conversation

@renatoalencar
Copy link

I'm submitting this an initial proof of concept, so I have something to discuss and raise some questions. The implementation is still very sloppy and it's missing some details, but I would like to ask about some points that are still a little bit obscure for me.

  • I need to convert a Piaf.Request.t to an Event.t, I've added a mock function to the interface, but I really think that it shouldn't be there and neither be named just mock. But I'm not sure about the best way of dealing with this.
  • Query strings may have multiple values for the same key, but StringMap uses string as values and not lists. The Uri module uses (string * string list) list as the type for parsed query strings, although AWS Lambda context has key pair values with single values for queryStringParameters and key with an array for multiValueQueryStringParameters. I'm not sure how to handle cases with more than one value for the same key for queryStringParameters. (I should probably take a look on how API Gateway works for that).
  • There are a bunch of hardcoded values, I've really tried generate most of those, but some are just fixed and would be complicated to generate, I think they could be command line arguments with default values.
  • I might need to add a command line parser, I've thought of Cmdliner, but Arg would also work and wouldn't add a new dependency.

@renatoalencar renatoalencar force-pushed the dev-server branch 3 times, most recently from c7accee to 5d089a9 Compare November 17, 2021 10:55
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

Successfully merging this pull request may close these issues.

1 participant