* This method will be called when a validator must be setup. * Do not setup the compiler more than once * @param {object} serverOptions the fastify server options
(serverOptions)
| 138 | * @param {object} serverOptions the fastify server options |
| 139 | */ |
| 140 | setupValidator (serverOptions) { |
| 141 | const isReady = this.validatorCompiler !== undefined && !this.addedSchemas |
| 142 | if (isReady) { |
| 143 | return |
| 144 | } |
| 145 | this.validatorCompiler = this.getValidatorBuilder()(this.schemaBucket.getSchemas(), serverOptions.ajv) |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * This method will be called when a serializer must be setup. |
no test coverage detected