Closed Soviut closed 2 years ago
I'm open to a middleware added here. It would need to conform to a similar interface as the existing validation middleware, though. Having the same tests could be a good way to ensure that: https://github.com/dbartholomae/lambda-middleware/blob/main/packages/class-validator/src/classValidator.test.ts
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Is your feature request related to a problem? Please describe.
I've been using AJV to validate my request payloads. I could see this being easily adapted to an official lambda-middleware.
JSONSchema is a well documented spec. AJV can return very detailed errors. It also doesn't require adapting your code to use classes.
Would you be willing to help with a PR?
Describe the solution you'd like
Turn the following into middleware.
Describe alternatives you've considered
What I'm doing now is already the alternative.