From 20d72d272e4e8a8f62a42ac21c231d01a1ad8ccc Mon Sep 17 00:00:00 2001 From: Vijay Date: Tue, 5 Jun 2018 13:39:09 +0530 Subject: [PATCH] force custom model instances from elastic https://github.com/ApplaudSolutions/mbaas/issues/850 --- index.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/index.js b/index.js index acf57a0..c6a6c3a 100644 --- a/index.js +++ b/index.js @@ -164,18 +164,6 @@ function mountSwagger(loopbackApplication, swaggerApp, opts) { } else { result[newKey].get.parameters = []; } - let nonElasticOperationIds = ['.prototype.__get__model', '.prototype.__get__user', '.prototype.__get__tenant']; - let nonElasticOperationId = nonElasticOperationIds.filter(opId => _.includes(result[newKey].get.operationId, opId))[0]; - if (!nonElasticOperationId && !_.endsWith(newKey, '/change-stream') && _.isArray(result[newKey].get.parameters) && _.findIndex(result[newKey].get.parameters, { name: 'getFrom', enum: ['mongo', 'elastic'] }) === -1) { - result[newKey].get.parameters.push({ - name: 'getFrom', - in: 'query', - required: true, - type: 'string', - enum: ['mongo', 'elastic'], - description: 'Gets the resource from the indexed elastic store rather than the default' - }); - } } }); return result;