fix(tags): use correct 'filter' query param for v2 tags API#35244
fix(tags): use correct 'filter' query param for v2 tags API#35244
Conversation
The getTags() method was sending 'name' as the query parameter to /api/v2/tags, but the backend TagResource expects 'filter'. Closes #33889
|
Claude finished @oidacra's task in 1m 24s —— View job Claude finished @oidacra's task in 1m 2s —— View job PR Review
The fix is correct. One thing to flag and one minor nit:
Everything else is clean. The parameter rename is propagated correctly across |
There was a problem hiding this comment.
Pull request overview
This PR fixes the frontend v2 tags lookup to use the backend’s expected filter query parameter when calling /api/v2/tags, restoring correct filtered tag results in the UI.
Changes:
- Update
DotTagsService.getTags()to sendfilter(instead ofname) to/api/v2/tags. - Update the associated
DotTagsServiceunit test to assert?filter=...is used.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| core-web/libs/data-access/src/lib/dot-tags/dot-tags.service.ts | Switch v2 tags search query param from name to filter. |
| core-web/libs/data-access/src/lib/dot-tags/dot-tags.service.spec.ts | Adjust test to expect the updated filter query param. |
…alignment Address PR review comments: rename parameter and update JSDoc in DotTagsService and DotEditContentService to match the v2 API 'filter' query param. Update downstream test expectation accordingly.
…er-parameter-and-r
Rollback Safety Analysis
Result: ✅ Safe To Rollback All changes in this PR are pure frontend TypeScript — a query parameter fix in Angular services to align with the backend v2 tags API. No category from the rollback-unsafe reference applies:
Label added: AI: Safe To Rollback |
Summary
getTags()inDotTagsServiceto sendfilterquery parameter instead ofnamewhen calling/api/v2/tagsTagResourcewas updated to use@QueryParam("filter")but the frontend was still sendingname, causing the API to return all tags unfilteredCloses #33889
Acceptance Criteria
getTags()method sendsfilterparam instead ofnameto/api/v2/tagsfilterparam is sentgetSuggestions()(v1 API) continues working as beforegetTagsPaginated()continues working (already usedfilter)Test Plan
yarn nx test data-access— all 611 tests passChanged Files
libs/data-access/src/lib/dot-tags/dot-tags.service.ts:39'name'→'filter'libs/data-access/src/lib/dot-tags/dot-tags.service.spec.ts:74This PR fixes: #33889