Generate static (offline) documentation for services' APIs

Description

As a dev/implementer/integrator, I want documentation on OpenLMIS' APIs.

We are starting to define and document all APIs in RAML format. While we may utilize Swagger to generate a live interface to browse/execute the APIs, an offline version is needed for general publishing. Using a service's RAML, generate offline doc and publish as part of the build artifacts.

Acceptance

  • For each service existing today (example, requisition, auth), add a process that generate static documentation from the service's RAML file.

  • The doc should be an artifact of the Jenkins build

  • The publishing step as well as the file format may be heavily influenced by the ReadTheDocs setup, not yet started at the time of this writing. By default, look to HTML format.

  • We ultimately want to present all services' documentation in a single "bundle". Again, this will likely be governed by OLMIS-673, but this requirement is good to keep in mind

See https://openlmis.atlassian.net/browse/OLMIS-796#icft=OLMIS-796 and https://openlmis.atlassian.net/browse/OLMIS-673#icft=OLMIS-673 for related topics.

Attachments

6

relates to

QAlity Plus - Test Management

Checklists

Activity

Show:
Mary Jo Kochendorfer
October 10, 2016 at 4:49 PM

could you speak with and about if there is a way to easily show us the other services? Or at least let me know the links for the other services.

Lucyna Laska
September 30, 2016 at 12:08 PM

Hi . Yes, API generation happening by service. For now, the API documentation for every service is not placed in one spot. Like you mention - http://openlmis.readthedocs.io/en/latest/api/index.html is only showing the requisition APIs. As far as I know, you can't see there the APIs documentation for other services.

Mary Jo Kochendorfer
September 29, 2016 at 8:24 PM

is the API generation happening by service? Is there a way to see all the services in one spot or navigate between the services? Right now http://openlmis.readthedocs.io/en/latest/api/index.html is only showing the requisition APIs, not Auth. Please let me know.

Lucyna Laska
August 3, 2016 at 1:34 PM

Test process:
Steps for generating static documentation file from:

a) openlmis-example service;
Note: repo has been cloned, docker should be running. Then:
1. Launch gradle clean command into command-line.

2. Launch gradle build command into command-line.

3. Verify if the api-definition.html file is accessible on openlmis-example/build/resources/main.

b) openlmis-requisition service;
Note: repo has been cloned, docker should be running. Then:
1. Launch gradle clean command into command-line.
2. Launch gradle build command into command-line.
3. Verify if the api-definition.html file is accessible on openlmis-requisition/build/resources/main.

c) openlmis-auth service;
Note: repo has been cloned, docker should be running. Then:
1. Launch gradle clean command into command-line.
2. Launch gradle build command into command-line.
3. Verify if the api-definition.html file is accessible on openlmis-auth/build/resources/main.

Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

1w logged

Sprint

None

Fix versions

Priority

Time Assistant

Created July 14, 2016 at 6:17 PM
Updated November 12, 2016 at 11:36 AM
Resolved August 3, 2016 at 1:34 PM