Upgrade to v3 API for tag_autocomplete
- Dominant language
- Python
- Stars
- 102
- Forks
- 182
- PR merge metrics
- No merged PRs in 30d
Description
The tag autocompletion currently uses the old util API.
Changing the presets.json from:
`"data-module-source": "/api/2/util/tag/autocomplete?incomplete=?"`
to
`"data-module-source": "/api/3/action/tag_autocomplete?query=?"`
won't work because the former returns `ResultSet[Result]` and the latter returns `result`.
I see the parseCompletions code in ckan/public/base/javascript/client.js
`var raw = jQuery.isArray(data) ? data : data.ResultSet && data.ResultSet.Result || {};`
but when I change it to `raw = data.result`
it doesn't work. Any tips?
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect presets.json and ckan/public/base/javascript/client.js, starting with parseCompletions and the two API response shapes described in the issue. Determine the compatible handling for tag_autocomplete, then verify that tag autocompletion works with the v3 endpoint and its returned data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100