-
Story
-
Resolution: Unresolved
-
Major
-
None
Today ListRoles only supports search by exact match. We need to support partial search as well.
Options considered:
- Support globs / wildcards ("*" or some such syntax) by backwards-compatibly evolving from exact match:
?name=foo -> continues to be an exact match
?name=foo* -> matches all names that start with "foo" - Support partial matches through different query params:
?name_contains=foo -> matches any name containing "foo"
?name_startswith=foo -> matches any name starting with "foo"
?name_glob=*f*oo* -> matches any name containing an "f" followed by a "oo" - Switch behavior based on another query param (the "V1" API way):
?name=foo -> matches only the name "foo"
?name=foo&name_match=partial -> matches any name containing "foo" - Continue to use query parameters for exact matches, and add a query string for other cases, as in AIP-160:
?q=[query] -> matches any role matching the query string (however that ends up being specified)
The current plan is (1), as per this discussion in Slack.
Only filtering by name currently needs to be supported. (This is based on the Figma linked in the initial API design, and this is all that is supported in the V1 UI.)
Acceptance criteria:
- Drive a decision on how to model partial search
- Update ListRoles API spec to document pattern
- Implement filtering for ListRoles
- Create stories for other APIs that need to be updated.
- Get reviewed and approved by architects/leads
- clones
-
RHCLOUD-44611 Update Rolebinding by Subject API implementation
-
- Code Review
-