-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
fastify v3 requires using ajv v6 and ajv-keywords v3 #164
Comments
Fastify v3 does not support ajv 8 out of the box You need to configure your server with ajv6 compatibility plugins, or follow this pr Or customizer the validator compiler by yourself |
Hi @Eomm , |
@Eomm thank you - I was thinking it is probably this issue. let me know if you need any advice on migrating to v8 in fastify v4. |
I'd like to know how we'd migrate to v8 in fastify v4 |
We don't have a release date for fastify v4 yet, but for sure it will support ajv 8 by default 👍🏼 |
Hi I came from Fastify as well, and saw that there is this option to set transform, but I'm not using plain JSON schemas , like: export const userLoginSchema = S.object()
.prop('firstName', S.string().minLength(2).maxLength(40)), //<-- trim and lowercase for example. or even add a custom transformer
.prop('username', S.string().format(S.FORMATS.EMAIL))
.prop('password', S.string().minLength(8).maxLength(40))
.required(['username', 'password']) Is this possible @Eomm |
This issue is solved IMHO and should be closed: fastify v4 supports ajv v8
Fastify supports fluent-json-schema out of the box. If you have a Minimal, Reproducible Example to show us the issue, please open a new issue on the fluent-json-schema repository. |
Hi
Below is Details ,
Node version : v14.16.0
Npm version: 7.7.6
Dependencies Details
"ajv": "^8.0.1", "ajv-keywords": "^5.0.0",
Code Snippet
stack trace Error
Help here would great !
The text was updated successfully, but these errors were encountered: