From 6fe6330c7f16bb723b56067f0245fb6b41620e7d Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Fri, 21 Jun 2024 22:04:45 +0000 Subject: [PATCH] Add: comment about OpenAPI validator --- server/Server.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server/Server.js b/server/Server.js index f48e3a559..9bf244a50 100644 --- a/server/Server.js +++ b/server/Server.js @@ -204,8 +204,13 @@ class Server { next() }) - // Install the OpenApiValidator middleware + // Install the OpenApiValidator middleware if using a dev environment if (Logger.isDev) { + // If you do not want to use this, you can comment out the entire section + // or only certain parts. + // + // The default value of `validateResponses` is false, so it can be safely commented + // out if the validation is causing problems. const apiSpec = Path.join(__dirname, '..', 'docs', 'openapi.json') app.use( OpenApiValidator.middleware({