what is the repo in which all the deafult code of openmrs classs( patient, persons ...etc) present

hi, @dkayiwa @ibacher @jnsereko @angshuonline In Openmrs/openmrs-core Reop i can see under the api folder some of these classes but the code inside these and the method that we using while importing the class ( eg. person , patient …etc) are not the same. when we import org.openmrs.Person or org.openmrs.Patient in our project the method these classes provides i basically want the github repo or any sorce code of that . pls can anyone can help in this ?

That’s all in openmrs-core in the api sub-folder. E.g., if you go to api/src/main/java/org/openmrs you’ll find Patient.java with the source code for org.openmrs.Patient. However, note that the master branch points to the latest versions of those classes. There are (in core) branches for every minor version (e.g., 2.5.x) and tags that correspond to specific version (e.g., 2.5.4).

thanks @ibacher for your response but here in the github repo of openmrs in which i have not not seen the Patient.java file in openmrs-core repo ? and as i had mentioned in my first query i wnat to see that source code whose class file we generally saw when we use the import org.openmrs.Patient or any other classes … if possible pls clear this thing .

i have one more query i have created another topic for that but i did not get any respose on that pls can you guide us on how openmrs generating swagger.json from openmrs code as much i saw in " openmrs webserives.rest module " it using a method with end point this " module/webservices/rest/swagger.json " to generate it and it is working well also . IN my case we are using openmrs as our base module so i an trying to do the same i go through the code and as per my understanding the thing i m able to get is like it Require one @Resource annotation just above the file for which we are trying to generate the swagger.json rest is handle by the controllers and methods written in the " webservices .rest module of the openmrs " i tried that for my controller but it did not generate the swagger spec in that json so pls can you help in this alos ( actually this is my main concern )

org.openmrs.Patient will be in the folder org/openmrs in a file called Patient.java. If you keep scrolling on GitHub (instead of opening the patient folder), you’ll find it.

On the Swagger stuff, you probably want to see this and this.

1 Like

thanku so much @ibacher i got the file patient.java . and also thanks for the suggested links that you provided for swagger.json generation , i will try to go through these step by step and if any issues arises will ask for your help . thanks

1 Like

hi, @ibacher @dkayiwa , i am facing one issue i tried to generate the swagger json for my project which is based on Openmrs . project named as ( sumitOpenmrsAPi. ) it structures like :-> which contain two modules one “/api/src/main/java/org/abc/module/abccore” and another “/omod/src/main/java/org/abc/module/abccore” . so in the omod module at i have created a resource object(amazonResource.java ) for my controller named as amazonController.java and in the Resource Object file i have added the ( @Resource annotation and have made the structure same as that is made in the Resource objects given in the Webservices.rest module ( here is the repo GitHub - openmrs/openmrs-module-webservices.rest: Provides RESTful web services for OpenMRS ) ) and i have seen these resource objects ( basically java files with @resource annotation) that helps to generate the swagger.json for the openmrs so i tried to obtain the same but i am getting error pls can you help me out here.