This commit is contained in:
parent
5e30c0402f
commit
4054efc251
6
index.js
6
index.js
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue