Page MenuHomePhabricator

AQS 2.0: Geo Analytics: Create OpenAPI Spec
Closed, ResolvedPublic

Description

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

  1. Add code annotations to document the endpoint. See the docs on wiki.
  2. Annotate the response format by adding an example and a description to each attribute. See the docs on wiki.
  3. Generate the spec using swag. See the docs on wiki.
  4. Preview the spec by loading the docs/swagger.json file into the API spec reader

Event Timeline

apaskulin updated the task description. (Show Details)

This is for a different service than T327838: AQS 2.0: Editor Analytics: Create OpenAPI Spec. I'll update the task name to reflect that.

BPirkle renamed this task from AQS 2.0: Editors: Create OpenAPI Spec to AQS 2.0: Geo Analytics: Create OpenAPI Spec.Mar 6 2023, 10:08 PM
SGupta-WMF changed the task status from Open to In Progress.Jun 20 2023, 11:27 AM
SGupta-WMF claimed this task.

Change 938474 had a related patch set uploaded (by Sg912; author: Sg912):

[generated-data-platform/aqs/geo-analytics@main] Bug:T317726

https://gerrit.wikimedia.org/r/938474

Change 938474 merged by Sg912:

[generated-data-platform/aqs/geo-analytics@main] Bug:T317726

https://gerrit.wikimedia.org/r/938474

VirginiaPoundstone moved this task from DONE to RESOLVED on the AQS2.0 board.
VirginiaPoundstone moved this task from RESOLVED to DONE on the AQS2.0 board.