Closed drama-ostrich closed 4 years ago
Looks like this is a change in restify. From the docs: http://restify.com/docs/plugins-api/#queryparser
queryParser
has an option called allowDots
which is apparently false
by default, but I think the docs might be out of date.
So the change you need is:
server.use(restify.plugins.queryParser({ allowDots: false }));
Thanks @ShaunParsons I updated the PR. The allowDots
fixes it.
i'll get this included asap
I just published 1.1.1 with this included
Hey my recent PR has a test that fails for restify. I noticed that providing a search query like
?model.includedmodel=value
allows searching for fields in included models, but apparently that isn't true for restify.In
list.js
, in the section to search forextraSearchCriteria
, the paramkey
would either bemodel
ormodel.includedmodel
depending on if you're using restify or not. This is due to the way Restify parses thereq.query
. With Restify the query would be an object with the shape of{ model: { includedmodel: 'value' } }
and without Restify it will be
{ model.indludedmodel: 'value' }
So I think there's a question here of if this type of search query should be allowed or encouraged at all. For now I'll put up a PR to disable the test for Restify.