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

Use Precompiled Validator? #910

Open
krcourville opened this issue Mar 26, 2024 · 0 comments
Open

Use Precompiled Validator? #910

krcourville opened this issue Mar 26, 2024 · 0 comments

Comments

@krcourville
Copy link

Is your feature request related to a problem? Please describe.
I have been testing this middleware via AWS Lambda. And it provides much better validation responses than AWS API Gateway, which is great. What is less great is that it adds a couple of seconds to lambda cold start times.

Describe the solution you'd like
My understanding is that AJV supports pre-compiled validators. Would it shave off start-up time if a precompiled AJV validator could be passed into configuration? Precompilation should also mean that the AJV modules can be excluded from the deployed JS bundle, further reducing cold start times.

Describe alternatives you've considered
I have yet to find a better implementation of OpenAPI data validation that supports recent features of the OAS.

Possibly, given some direction, I'd be willing to create a branch off this repo and experiment and contribute back via PR if the experiment works.

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