Improve "filter" arg description
Add an example showing how to serialize object values as JSON.
This commit is contained in:
parent
c69e010670
commit
440b9a52a6
|
@ -750,7 +750,9 @@ module.exports = function(registry) {
|
||||||
{arg: 'id', type: 'any', description: 'Model id', required: true,
|
{arg: 'id', type: 'any', description: 'Model id', required: true,
|
||||||
http: {source: 'path'}},
|
http: {source: 'path'}},
|
||||||
{arg: 'filter', type: 'object',
|
{arg: 'filter', type: 'object',
|
||||||
description: 'Filter defining fields and include'},
|
description:
|
||||||
|
'Filter defining fields and include - must be a JSON-encoded string (' +
|
||||||
|
'{"something":"value"})'},
|
||||||
{arg: 'options', type: 'object', http: 'optionsFromRequest'},
|
{arg: 'options', type: 'object', http: 'optionsFromRequest'},
|
||||||
],
|
],
|
||||||
returns: {arg: 'data', type: typeName, root: true},
|
returns: {arg: 'data', type: typeName, root: true},
|
||||||
|
@ -783,7 +785,8 @@ module.exports = function(registry) {
|
||||||
accessType: 'READ',
|
accessType: 'READ',
|
||||||
accepts: [
|
accepts: [
|
||||||
{arg: 'filter', type: 'object', description:
|
{arg: 'filter', type: 'object', description:
|
||||||
'Filter defining fields, where, include, order, offset, and limit'},
|
'Filter defining fields, where, include, order, offset, and limit - must be a ' +
|
||||||
|
'JSON-encoded string ({"something":"value"})'},
|
||||||
{arg: 'options', type: 'object', http: 'optionsFromRequest'},
|
{arg: 'options', type: 'object', http: 'optionsFromRequest'},
|
||||||
],
|
],
|
||||||
returns: {arg: 'data', type: [typeName], root: true},
|
returns: {arg: 'data', type: [typeName], root: true},
|
||||||
|
@ -795,7 +798,8 @@ module.exports = function(registry) {
|
||||||
accessType: 'READ',
|
accessType: 'READ',
|
||||||
accepts: [
|
accepts: [
|
||||||
{arg: 'filter', type: 'object', description:
|
{arg: 'filter', type: 'object', description:
|
||||||
'Filter defining fields, where, include, order, offset, and limit'},
|
'Filter defining fields, where, include, order, offset, and limit - must be a ' +
|
||||||
|
'JSON-encoded string ({"something":"value"})'},
|
||||||
{arg: 'options', type: 'object', http: 'optionsFromRequest'},
|
{arg: 'options', type: 'object', http: 'optionsFromRequest'},
|
||||||
],
|
],
|
||||||
returns: {arg: 'data', type: typeName, root: true},
|
returns: {arg: 'data', type: typeName, root: true},
|
||||||
|
|
Loading…
Reference in New Issue