+ private getJsonRequestValidateFunction<T extends JsonType>(
+ commandName: RequestCommand,
+ schema: JSONSchemaType<T>
+ ): ValidateFunction<JsonType> {
+ if (!this.jsonRequestValidateFunctions.has(commandName)) {
+ this.jsonRequestValidateFunctions.set(commandName, this.ajv.compile<T>(schema).bind(this))
+ }
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
+ return this.jsonRequestValidateFunctions.get(commandName)!
+ }
+