service collection filtering
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 39
Description
There is an inconsistency when it comes to filtering on the `/v1/catalog/services` endpoint.
In the documentation as seen in [collection filtering](https://developer.hashicorp.com/consul/api-docs/catalog#filtering-1) there is a multitude of options for filtering but the response from the endpoint is in a very simplified form:
`{
"consul": [],
"redis": [],
"postgresql": ["primary", "secondary"]
}`
and does not contain any of that information making it impossible to filter for the specified options. The list of available filters is
identical to those on the `/catalog/service/:service_name` endpoint where the required data for filtering is returned making filtering possible when fetching individual services from the catalog but not on the collection endpoint.
Contributor guide
Research direction
Start by comparing the collection endpoint `/v1/catalog/services` with the documented collection filtering options and the `/catalog/service/:service_name` endpoint. Trace how each endpoint returns service data and determine what information the collection response must expose for its documented filters to work. Done means the documented filters operate consistently on the collection endpoint and the behavior is covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100