Closed erwinstone closed 1 year ago
We do parse the schema as sync. Therefore, you cannot use async schema.
Async should not be used as part of the first validation strategy. This option is used to access Databases and reading them during the validation process may lead to Denial of Service Attacks to your application. If you need to run async tasks, use Fastify's hooks instead after validation completes, such as preHandler.
Fastify Docs
Schema:
Response: