fix(rest): revert to Groovy-era makeFindUrl behavior #1687
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When porting SearchUtils from Groovy to Java in 8b6df39 the makeFindUrl behavior changed slightly. Basically, due to going from Groovy's check-if-falsy
if (!v)toif (v == null), which is quite different!, https://id.kb.se/data.jsonld ended up going fromview.@id's like/find?q=*&and-inScheme.@id=https://id.kb.se/marcto
/find?q=*&_limit=0&and-inScheme.@id=https://id.kb.se/marc...and the addition of
_limit=0breaks the id.kb.se UI: https://id.kb.se/find?q=%2a&_limit=0&and-inScheme.%40id=https%3A%2F%2Fid.kb.se%2FmarcWithout it: https://id.kb.se/find?q=*&and-inScheme.%40id=https%3A%2F%2Fid.kb.se%2Fmarc
This fix simply reverts to the old
makeFindUrl()behavior (and adds a test for it).