Vijay Kumar 2018-04-16 14:02:47 +05:30
parent 5e30c0402f
commit 4054efc251
1 changed files with 3 additions and 3 deletions

View File

@ -164,9 +164,9 @@ function mountSwagger(loopbackApplication, swaggerApp, opts) {
} else {
result[newKey].get.parameters = [];
}
var nonElasticOperationIds = ['.prototype.__get__model', '.prototype.__get__user', '.prototype.__get__tenant'];
var 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: ['elastic'] }) === -1) {
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: ['elastic'] }) === -1) {
result[newKey].get.parameters.push({
name: 'getFrom',
in: 'query',