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

Add flag to ignore unused endpoint parameters #39

Closed
lihaoyi opened this issue Dec 8, 2020 · 3 comments
Closed

Add flag to ignore unused endpoint parameters #39

lihaoyi opened this issue Dec 8, 2020 · 3 comments

Comments

@lihaoyi
Copy link
Member

lihaoyi commented Dec 8, 2020

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

@jodersky
Copy link
Member

jodersky commented Dec 8, 2020

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)

@lihaoyi
Copy link
Member Author

lihaoyi commented Dec 10, 2020

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

@lihaoyi
Copy link
Member Author

lihaoyi commented Jan 24, 2024

Fixed by #108

@lihaoyi lihaoyi closed this as completed Jan 24, 2024
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