Add full_path_search parameter to namespaces API
What does this MR do and why?
This MR adds a full_path_search parameter to the Namespaces REST API. When enabled, the search filter would be used to filter the results by their full path. It returns namespaces with fullpath that contains the search query.
-
Default behavior (unchanged):
?search=barreturns["/bar", "/foo/bar"] -
New behavior:
?search=bar&full_path_search=truereturns["/bar", "/foo/bar", "/bar/fuzz", "/foo/bar/baz"]
References
- Prerequisite for Add `Namespace` filter to shared Vue components (#541501 - closed).
- For search bar filter autocomplete. We need an API that lists available namespaces based on the user's current input.
- Closes #551089 (closed)
Screenshots or screen recordings
| full_path_search=true | full_path_search=false |
|---|---|
|
|
|
|
UI from: #541501 (closed)
Screen_Recording_2025-06-25_at_6.59.21_PM
How to set up and validate locally
- Create a group with the path
/foo - Create a subgroup with the path
/foo/bar - Send an HTTP request to
/api/v4/namespaces-
?search=foo/bar&full_path_search=falseshould return an empty result -
?search=foo/bar&full_path_search=trueshould return the/foo/bargroup.
-
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #551089 (closed)
Edited by Shane Maglangit



