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

Validation #13

Open
digitalsadhu opened this issue Mar 20, 2023 · 0 comments
Open

Validation #13

digitalsadhu opened this issue Mar 20, 2023 · 0 comments

Comments

@digitalsadhu
Copy link
Member

We should look a bit more at how we do validation.

Currently, we enforce AJV validation for query params etc.

Feedback for the current approach:

  • Downside with AJV (and runtypes) is that the schema is another API that you have to learn. And it is kinda redundant when you also have TS declarations.
  • Adds extra CPU cycles to every request

Suggested improvement from feedback

  • Make it configurable so you can validate with something else other than AJV or even disable in prod while leaving it enabled for local and dev/staging

Questions

  • What is the cost of validation of every request runtime?
  • Are there other approaches we should/could look at for validation?
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

1 participant