com-lihaoyi/cask

Add flag to ignore unused endpoint parameters

Closed this issue · 3 comments

Currently, you cannot write an endpoint that takes a dynamic set of query parameters by manipulating req.queryParams, as unknown query parameters are rejected during input validation. While that's a reasonable default, we should provide a flag to disable that validation so a developer can work with req.queryParams fully dynamically if that's what they want

FYI, I had a protoype here #34. I didn't go through with it, because I thought the place where the flag was defined was a little obscure. Maybe it's ok however. In the end, I came up with a workaround by defining my own HttpEndpoint: #34 (comment)

Yeah we ended up with a custom endpoint as well; we just subclassed @cask.get and made it pass Map() as the arguments. Works well enough, but would be nice to have a simple flag

Fixed by #108