Last active
February 14, 2017 06:46
-
-
Save vespertilian/c63d6f06c14bed5af90b to your computer and use it in GitHub Desktop.
Filter samples for Swagger and Strongloop Loopback
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"where": {"teamId": 1}} | |
use in swagger will url encode | |
{"include": ["price","item"]} | |
or | |
localhost:3000/api/stores/66525d9f-ca9a-4e6e-aaac-79f41746543f/storeitems?filter[include]=price&filter[include]=item | |
const filter = { | |
filter: { | |
include: [ | |
'price', | |
{ | |
relation: 'item', | |
scope: { | |
include: ['layer', 'category', 'subCategory', 'option'], | |
} | |
}, | |
], | |
fields: {priceId: true, id: true, itemId: true} | |
} | |
}; | |
filter: { | |
include: [ | |
'price', | |
{ | |
'item': ['layer', 'category', 'subCategory', 'option'] | |
}, | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment