Skip to content

Add option to use AJV Standalone #297

@rehanvdm

Description

@rehanvdm

I saw this issue #114 and the resulting PR, which lazy loads schemas, which is great for environments like AWS Lambda.

There is now a new method in AJV 8 to generate the schemas to JS functions at compile time so that they can be used at runtime, no more compiling schemas at runtime which saves a lot of time. You can read more about the process here: https://ajv.js.org/standalone.html and I also wrote a blog about it here: https://www.rehanvdm.com/blog/typescript-type-safety-with-ajv-standalone. . Fastify also added the option recently, might be worth seeing their implementation.

One of the main reasons I chose this package is because it uses AJV for validation instead of the other validation libraries that can be slow.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions