Week 9: Code Review and Introspection issues!


📅 July 28 – August 03
What I Planned to Do
To start working on the search handler’s logic and make it API documentation ready by refactoring the code or adding new logic
Make a decision on where I want to take the plugin in terms of making it truly standalone or configurable and portable
To participate in code review and bring up the project towards OpenMRS coding convention if any aren’t
What I Worked On
This week was relatively slow in terms of new code and logic as I have been doing for the past several weeks, but it was just as important considering I checked out all my code for code review
As I said last week, I asked my mentors to review my code as I have been working on completely new logic as compared to few weeks prior
Till then, I started researching on a new approach for the schema introspector where I was checking if I can use this plugin inside a module instead of hardcoding the logic inside the pom file
My mentor Chi Bong put a pull request cleaning up dependencies I missed that were redundant, solving the logging issues I was trying to solve, and commented on some other things as well
I took my time verifying the changes on my side, ran the plugin without the dependencies and it was ready to be merged in the main branch
I was informed that my introspector didn’t generate accurate properties for
UserResource2_2
andCustomDataTypeResource1_9
which casted a big shadow of doubt on the robustness on the logic of the schemaI went and checked the properties, and it indeed didn’t scan the
getRepresentationDescription()
for some reason and was printing out the wrong propertiesI started working on an enhanced introspector which explicitly invoked the method if it was present inside the resource file and started testing it
I couldn’t test the introspector easily as I had removed the files from the REST module which also had a controller which had the necessary endpoints to check so I got to transferring a copy to the module
In the meantime, I also talked with both of my mentors about the final stages of the project and increasing the amount of time I am putting in, and hopefully until next week I sort out this big issue
Challenges Faced
To verify whether the dependencies were needed in the PR, running them one-by-one and debugging any which were causing an error
Debugging the introspector, verifying whether the properties were accurately generated or if there was a bug present
Commits/PRs This Week
PR Title: Initial implementation of OpenAPI Generator Maven Plugin with JavaParser integration
Status:
Draft
Check out my plugin repository: https://github.com/capernix/openmrs-maven-plugin-openapi
My Demo Video: https://youtu.be/SQ_ksJfMjsA?si=AiG1momcw8HO-HIC
Plans for Next Week
To fix the introspector bug and come up with an enhanced and watertight version with robust property introspection
To move forward with generating openAPI specs for the search handlers and RepHandlers
Notes/Discussion Points
- Since the final few weeks are approaching, I have to start aggregating all the work done till now and polish everything
Thank you!
Subscribe to my newsletter
Read articles from Marvin directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Marvin
Marvin
21 | cs sophomore @ SPIT Mumbai | GSoC 2025 Contributor @ OpenMRS | Backend Dev | Java, Python, Spring Boot, Maven