cdimascio / express-openapi-validator

🦋 Auto-validates api requests, responses, and securities using ExpressJS and an OpenAPI 3.x specification
MIT License
920 stars 211 forks source link

Expose validator for use in apps that don't use Express? #916

Open jon-wyatt-eco opened 6 months ago

jon-wyatt-eco commented 6 months ago

Is your feature request related to a problem? Please describe. Hi, this looks awesome and one of the few (only?) validators working with OpenAPI 3.1 specs however I was hoping to use this in an AWS Lambda / API Gateway setup where I don't currently use Express

Describe the solution you'd like A way to import just the validator not in the form of Express middleware either as separate package or named export from this one

Describe alternatives you've considered Looks like we might be able to hack this to work by just passing Express middleware style args in to get the validation results but that would still result in including Express as a dependency and probably lot's of hassle keeping Typescript happy!

Additional context