The AQS 2.0 project is currently evaluating an OpenAPI-based toolset to create API docs:
- Swag generates an OpenAPI specification based on a mix of code annotations and the code itself.
- RapiDoc converts the specification into HTML.
Our goal is to create API docs that are reliable and easy to update by maintaining docs as close as possible to the code.
To do
- Add general API information: This needs to be done before documenting individual endpoints. See the docs on wiki for instructions.
- Document /by-country/:project/:activity-level/:year/:month
How to document an endpoint
- Add code annotations to document the endpoint. See the docs on wiki.
- Annotate the response format by adding an example and a description to each attribute. See the docs on wiki.
- Generate the spec using swag. See the docs on wiki.
- Preview the spec by loading the docs/swagger.json file into the API spec reader