This repository was archived by the owner on Aug 28, 2021. It is now read-only.

Description
Step 0:
Expected Behaviour
Updates in the server REST API spec should automatically generate API docs from said spec.
Actual Behaviour
API docs are generated manually.
Affected Projects
Most of the clients I guess could benefit from this. We could potentially even generate all clients from the generated API spec. Even if we can't generate the clients, it will be a lot easier to create and maintain them as well as keep them homogenous across different languages.
Proposed Solution (if any)
I've got a twofold solution proposal: one for API object schemas and the other for REST endpoint documentation:
- Object Schemas: use jsonschema to validate objects sent to and from the API. If schemas are set somewhere on the server's code base then it will be relatively easy to implement schema validators on all the clients also by either copying it over or even (if we want to be super fancy) providing server calls to the different schemas so clients receive schemas directly from the live server.
- REST Endpoint doc: use swagger-jsdoc (nice example implementation here) to generate swagger.json and use swagger-ui to render it from the server (so each server whatever version it is contains it's own in-built documentation).