I am Ayeshmantha Perera.Currently studying my Master in IT.I would like to involve in the GitHub Documentation for REST API project.
I found it interesting since it’s about api documentation and which am familiar with as a developer.
And also I so a similar GSoC project which was carried out in 2017.And had a walk through as well.
As a starting point am wondering what can be tasks for me to pick up and work on this.
I went through the project description as well.Since I already have worked with some of the endpoint when am contributing to reports module and core module and on the work am already doing.I have bit of knowledge on the swagger documentation of openMRS.
What I want to know is are we proceeding with making the swagger documentation more readable or we are proceeding with writing separate api documentation for all the endpoints
The ultimate goal is to have beautiful REST API documentation hosted alongside our Javadoc documentation at api.openmrs.org similar to what you see at developer.github.com/v3/. Having interactive examples interspersed within the text that run against the demo server would be even better.
Ideally, documentation would be coupled with code to avoid divergence/inconsistencies and editing it would be easy for developers as well as technical writers. Some thoughts on how this could be done:
Manually write API documentation (e.g., in Markdown)
Pros: straightforward for technical writers and could be easy for devs to edit as well
Cons: lack of any coupling between docs & code increases chances for mismatch
Introducing Markdown within Javadocs that could be programmatically turned into documentation.
Pros: tight coupling of documentation with code
Cons: might be harder for non-devs to contribute to documentation and harder to see the “big picture” to be consistent across the documentation, there would still likely be introductory or non-resource-specific documentation we’d want to include.
Manually generate interactive examples from the code using Swagger and then intersperse documentation around the interactive examples.
Pros: likely easier for non-devs to manage documentation
Cons: looser coupling between code & documentation could reduce contributions from devs and lead to mismatch between docs & code
Some combination of approaches (e.g., manually create intro & cross-cutting documentation for things like authentication and pull resource-specific documentation from Javadocs)
Pros: tight coupling of documentation with code where it matters most while allowing for easier organization and handling of non-resource-specific content like intro, auth, etc.
Cons: more moving pieces, might be harder for non-devs to contribute to resource-specific documentation
Given GSoD is about documentation, I think generating the text is most important – e.g., writing Markdown documentation introducing the API, covering authentication, and then for each resource with some (perhaps hidden) labelling that would make it easier to move the text into source code in the future if we went that direction.
The extent to which we can document using Swagger or a Swagger-friendly approach, the easier it would be to align this effort with exiting API documentation.
I think we can improve the swagger documentation as well with more proper responses errors and also describing more about the attributes in the api calls.
I already worked on similar project and done swagger documentations as well.
@atlcto I think most of the options that you shared are based on swagger documentation and open api spec is swager 3.0.I am already working on a apache project to have support for openapi spec 3 (PR :- https://github.com/apache/juneau/pull/44).And as I mentioned before we have swagger in place so I hope theres no need to migrate for a new swagger like documentation if am right @burke
I found a librarywhich can be helpful to full fill what you mentioned.Having markdown documentation align with already existing swagger .
The best thing about this is it now supports the openapi spec 3 as well.So if you’re already thinking about migrating to openapi spec 3 as gayan mentioned I can work on the base class migration and have support for openapi spec 3 as well.Since am already working with openmrs I hope it will be possible for me to do that as well.
And when it comes to this library we can use our swagger.yml files as an input and generate markdown documentation
I’m looking forward to work on Developing User friendly Github Documentation Rest API documentation with GSOD and yeah maybe it will be migrated to OpenAPI Spec 3 as well yeah let’s see will let you know if we need any assistance. Btw thank you for asking.
Thanks for your reply. Please keep me updated, as I am very interested in contributing to the “Developing User friendly Github Documentation Rest API” GSOD project.
Hi @laurelmichaels
Yes please if you found something useful please update me too am also intrested in contributing as tech writer in gsod for this project
hello ayesh, i can extend my services as technical writer in this project GSoD, Developing User friendly Github Documentation for REST API. please involve me in this project, if there is something i can contribute to. i am motivated to work on this project. i would appreciate reading from you.
thanks ,