API Documentation Tool
Requirements from Doc Team
- Any tool choices shouldn't affect how and when the documentation team works on docstrings for the endpoint classes.
- The main priority is having docstrings that are tool independent as much as possible.
History of various tools used at edX
Apiary
- The solutions team (contact: Matthew Drayer) has used it during the design phase and for collaboration by multiple editors.
- They have not used it for live documentation for something that is released. That is, it wasn't a publishing tool that read docstrings from code files and published it in independent form.
- Example: http://docs.edxcoursemetadataapi.apiary.io/#
Swagger
- The analytics team (contact: ClintonB (Deactivated)) has used it for publishing the APIs on the analytics server. It works with docstrings as we have them, assuming we set up Swagger to be installed with the server module.
- Example: https://stage-edx-analyticsapi.edx.org/docs/
Django Rest Viewer
- APIs created using the Django Rest Framework are automatically published using the django rest viewer.
- Example: https://courses.edx.org/api/mobile/v0.5/video_outlines/courses/MITx/6.002_4x/3T2014
Table of Options
Swagger django-rest-swagger | Apiary & API Blueprint | |
---|---|---|
Recommended By | Mark (used at GoDaddy) & Kishore (used at Staples) | |
Format | JSON | Markdown |
Sponsored by | Reverb | Apiary |
Spec License | ASL 2.0 | MIT |
Design Approach | code then publish | publish without/before code top-down |
Authoring | any tool | apiary.io |
Mocking | using CodeGen | yes |
Server Code Generate from Code | Django and others | (3rd party) |
Dependencies | Python (2.6.5+), Django (1.5.5+), DRF (2.3.8+) | none |
SDK code generator | Swagger CodeGen | |
Authentication | Basic, OAuth2 | |
API version metadata | yes | |
Stackoverlow questions | 1,930 | 271 |
Github stars | 8,031 (swagger-spec, swagger-ui, swagger-codegen, swagger-core) | 2,201 (api-blueprint) |
Cost | https://apiary.io/pricing |