You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing the GET method for the /api/jobs endpoint with the 'search' query param, expect to receive only the job instance corresponding to the search result.
(It is specified in the api document to support the 'search' parameter)
Current Behaviour
When executing the GET method for the /api/jobs endpoint with the 'search' query param, all queryset results are returned.
This is because the 'search_fields' attribute does not exist in the JobViewSet class. (For test, I added the following code to the JobViewSet class and I found it works as expected)
However, I do not conclude that it is a bug that search_fields is not declared in the JobViewSet class.
This is because when checking 'Jobs' page in chrome web browser rather than REST API client (like Postman), stage, state, and assignee filter exist instead of search field, and I think this may be the design or implementation intention.
If my guess is correct, I think that 'search' should be excluded from the parameter list in the api document for GET /api/jobs.
Possible Solution
Excluding 'search' from the parameter list of GET /api/jobs in the api document.
(This is possible by adding the code below to @extended_schema_view(list) of the JobViewSet class)
@k1won , Thanks for the report. Could you please look at #4319? Will it close the issue?
@nmanovic , If #4319 is applied, only the search fields explicitly declared in the viewset class will be displayed in the api document by the SearchFilter class right?
If my understanding is correct, I think this issue(#4385) will be resolved.
I will test again after applying #4319.
Thanks for the information.
My actions before raising this issue
Expected Behaviour
(It is specified in the api document to support the 'search' parameter)
Current Behaviour
This is because when checking 'Jobs' page in chrome web browser rather than REST API client (like Postman), stage, state, and assignee filter exist instead of search field, and I think this may be the design or implementation intention.
Possible Solution
(This is possible by adding the code below to @extended_schema_view(list) of the JobViewSet class)
Steps to Reproduce (for bugs)
(
http://localhost:7000/api/jobs?org=test&search=new
)Context
Your Environment
git log -1
): 01eaf36docker version
(e.g. Docker 17.0.05):Logs from `cvat` container
Next steps
You may join our Gitter channel for community support.
The text was updated successfully, but these errors were encountered: