Closed savetheclocktower closed 8 months ago
You are totally right here that it seems weird for them to be broken up.
And this issue gets even worse when you consider that the search endpoint does already support the order parameter.
It'll likely take some time to get the SQL statement right to accommodate all of these different features, but this is a great idea.
I'll add, what we would likely want to do is perfect one of the database
functions to be able to handle each use case, then have these two endpoints rely on the same function, maybe even deprecating the special search
endpoint, as it's redundant at that point.
Is this feature Currently Implemented in any way with the upstream API Server
Is your feature request related to a problem? Please describe.
There's one endpoint —
/package/search
for searching against the name of a package. There's another endpoint —/packages
— for filtering on packages with fields likeservice
. This means there appears to be no way to search and filter at the same time.Describe the solution you'd like
I think there should be one endpoint — probably just
/packages
. Ifq
is present, a search is performed. If other fields are present, other clauses are added to the SQL query.