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
Update Validation-and-Serialization.md #1094
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Could you add a link to ajv website too? https://ajv.js.org/
docs/Validation-and-Serialization.md
Outdated
@@ -109,16 +109,28 @@ The function `getSchemas` returns all shared schemas that were added by `addSche | |||
|
|||
The `schemaCompiler` is a function that returns a function that validates the body, url parameters, headers, and query string. The default `schemaCompiler` returns a function that implements the `ajv` validation interface. Fastify uses it internally to speed the validation up. | |||
|
|||
While you cannot change the configuration options of the default `ajv` instance, you can create your own: | |||
The configuration options of the default fastify `ajv` instance are set as |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"fastify" => "Fastify"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, just replace the sentence with:
"Fastify's baseline ajv
configuration is:"
docs/Validation-and-Serialization.md
Outdated
} | ||
``` | ||
|
||
and cannot be changed. If you want to change or set additional config options, you will need to create your own instance and override the existing one like: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"and cannot be changed." => "This baseline configuration cannot be modified."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jsumners are you good with this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Explains #1093
Checklist