API v2: Planning Issue #3520
Labels
break-me-up
break up for cleaner code separation, discrete tests, and, easier and iterative collaboration
enhancement
explains that the issue is to improve upon one of our existing features
help wanted
requires help by anyone willing to contribute
planning
Planning issues!
Ruby
@milaaraujo and I worked part-time on the API on our Rails Girls Summer of Code program. We were able to remove some duplicated code and refactor the whole Search feature.
But we couldn't finish it all and to leave a documentation for future work, there are some improvements that can be made:
Refactor the search.rb Class. It's too coupled with the DocResult class. Besides that, we notice that to create a DocResult, the endpoints have only small differences between them, so that could be abstracted to another service to reduce the duplicated code there.
Change all endpoints to use a
search_criteria
. We couldn't work on all the endpoints during our program, but the ones we worked on using asearch_criteria
valid object to access the params. The ideal would be to have all the endpoints to do the same (more details are given below).Add more tests
Change version from v1 to v2
API next steps?
The text was updated successfully, but these errors were encountered: