Reputation: 1121
I'm trying to use the filter object in Loopback 4 to do a where clause, let's say I have a model named city and I want to filter the cities based on the name.
How you that filter look like in Loopback 4 explorer?
Here is what I have:
{
"where": {"name":"Orlando"},
"offset": 0,
"limit": 10,
"order": [
"string"
]
}
This will produce the following Request URL:
http://127.0.0.1:3000/cities?filter[offset]=0&filter[limit]=10
I want to produce: http://127.0.0.1:3000/cities?filter[where][name]=Orlando&filter[offset]=0&filter[limit]=10
Thanks in advance for any help!
Upvotes: 1
Views: 3298
Reputation: 1275
This is s known bug in Loopback 4.x due too a known bug/limitation of swagger-ui and swagger-js. See the corresponding discussions on Loopback's Github:
And the corresponding issue for the swagger-js:
Upvotes: 1