get api filter limit 10 by default
This commit is contained in:
parent
1a1a297b57
commit
d52eef3bb7
6
index.js
6
index.js
|
@ -157,7 +157,11 @@ function mountSwagger(loopbackApplication, swaggerApp, opts) {
|
|||
});
|
||||
}
|
||||
if (verb === 'get' && result[newKey].get) {
|
||||
if (!result[newKey].get.parameters) {
|
||||
if (result[newKey].get.parameters) {
|
||||
if (result[newKey].get.parameters[0].name === 'filter') {
|
||||
result[newKey].get.parameters[0].default = JSON.stringify({limit: 10});
|
||||
}
|
||||
} else {
|
||||
result[newKey].get.parameters = [];
|
||||
}
|
||||
if (_.isArray(result[newKey].get.parameters) && _.findIndex(result[newKey].get.parameters, { name: 'getFrom', enum: ['elastic'] }) === -1) {
|
||||
|
|
Loading…
Reference in New Issue