I’ve been selected for the Google Summer of Code 2021 to work on the project “The REST of Administration”. I’ll be using this thread for discussion and updates about the project. I will also write about my GSoC 2021 experience on my blog: https://rasztabiga.me/blog
Unfortunately, I’m currently busy with my university responsibilities, that’s the reason for my reduced activity, but I will try to get familiar with the project and collect any left requirements until the start of it.
Question to my mentors, do you want me to schedule a weekly meeting with the three of us to talk through updates on the project, or do you want to keep the discussions here?
Congrats @navareth upon being selected to contribute on this project
IMO we can keep the discussions here more so for the updates in regards to your progress though feel free to engage the mentors for a call ,also on irc or slack
I’d change that “or” to an “and”.
If weekly meetings work for mentor(s) and help keep you unblocked, that’s fine, but asynchronous discussions on Talk help others follow along.
I’d love to see an enumeration of missing admin functions – i.e., a list of admin functions that are currently not exposed via the REST API that we could prioritize and work through. Some are probably going to be straightforward and others may need some design (new resources). We could help you work through design on those while you are coding the others.
Sounds good. I guess we could first focus on the part described on the project’s wiki page, which is exposing the administration links list through REST API.
By the way, are there any currently known admin functions that are not exposed via the REST API so I could take a look and start designing them soon, or should I just tinker within the legacy UI module to find them on my own?
Looking at each function in the Legacy UI and subtracting those that have been done as an OWA would be a start. rest.openmrs.org could help (i.e., those functions that aren’t documented).
Thanks for the clarification.
I guess I will start with adding the resource that was first described on the project’s page - that is the list of administration links for installed modules on the advanced administration page in legacy UI.
I had an idea to gather all classes that extend AdministrationSectionExt abstract class using Java reflection. Is that a viable solution in a system with multiple modules installed? I’m wondering whether other module classes will be present on the classpath of the REST-WS module? @dkayiwa@gcliff
One of the tasks of this GSOC project is to expose a list of administration links through REST API.
Each module, to participate in that list, has to extend AdministrationSectionExt interface. That’s why I thought I could gather all classes that extend this abstract class and then map them (with their links) to appropriate REST resource.
If you know a better solution to gather these links, please let me know or guide me in the right direction
I believe every module needs to register itself and the admin service is already maintaining a list of these, so you shouldn’t have to search for them; rather, get access to the admin service’s list – presumably the list used to generate the links in the legacy UI.
Good point, I will take a look at how LegacyUI module is generating the administration links list.
EDIT: After taking a look I guess I could use ModuleFactory.getExtensions("org.openmrs.admin.list") to retrieve list of AdministrationSectionExt. I could then map them to a list of administration links. I will try to come up with some prototype if that’s a proper solution. @dkayiwa@gcliff
I will need to create an object for the AdministrationLink REST resource. Can you tell me whether I should create it in the rest-ws module or openmrs-core? Also, should I extend BaseOpenmrsMetadata?
I’ve created a prototype of a REST resource, which provides links for administration functions, that uses ModuleFactory.getExtensions(pointId).
It means that I have also confirmed that my assumptions were correct and the idea above works.
I will now proceed to create a design document to share and discuss with you.
I’m also going to add a new blog post about REST-WS module development. I think it could be useful for future developers.
I will update each one of them with more details as soon as they are approved and I will be able to move to the design phase.
I have also added a few tasks that I thought might be useful and are still related to OpenMRS REST API, like updating documentation.
Please let me know if you have any comments about them. If there are any known priorities (which tasks should be done first) then also kindly let me know
What do you think about the tasks I’ve prepared? Do you think it will be an ideal amount for this summer? I don’t want to overcommit as well as not to underperform
If it looks good to you, maybe you could help me get these tasks approved so I could claim them in JIRA.
By the way, I should have the first PR ready for the task RESTWS-821 by the end of this week.