OpenMRS Swagger UI source
This branch is a snapshot of the swagger-ui
repo.
It contains the modified source to build the Swagger UI interactive API documentation for OpenMRS.
For the original README see README.swagger-ui.md.
To make changes to the OpenMRS Swagger UI, edit the files in the src
directory,
then run:
npm run build
This will build the dist
directory. The entire dist
directroy should then
be copied to omod/src/main/webapp/resources/js/swagger-ui
in the OpenMRS REST Web Services
Module repo.
You will then need to rebuild the OpenMRS REST Web Services module to bundle the new OpenMRS Swagger UI distribution.
To test your OpenMRS Swagger UI changes, build the dist
directory as described
above, then navigate into it and run an http server:
http-server -p 8033
You can then access the OpenMRS Swagger UI at http:https://localhost:8033/.
The above example uses http-server
,
but you are free to use the HTTP server of your choice.
📌 Note that when you are testing, the wrapper page is
index.html
, but when the docs are actually served from the OpenMRS user interface, the wrapper page isapiDocs.jsp
.
In order to enable testing as described above, or to allow apps on different servers to access your OpenMRS API, you'll need to enable Cross-Origin Resource Sharing in Tomcat.
See instructions here for Tomcat 7 and here for Tomcat 6.
swagger-ui
licensed under APL-2.0