This PR provides some nice documentation for API consumers.
The documentation is maintained as formatted annotations in code comment. The tool swagger-php extracts these annotations and produces a standard JSON OpenAPI spec file. This file is then used by OpenAPI Explorer to produce some nicely-formatted HTML documentation. I chose OpenAPI Explorer because as a web component it is easy to include in our own views.
Setup instructions
A small nginx config change is required: a05205bc1c2cb82aabf04388648fdaba361b6966
This PR provides some nice documentation for API consumers.
The documentation is maintained as formatted annotations in code comment. The tool swagger-php extracts these annotations and produces a standard JSON OpenAPI spec file. This file is then used by OpenAPI Explorer to produce some nicely-formatted HTML documentation. I chose OpenAPI Explorer because as a web component it is easy to include in our own views.
Setup instructions
composer install
rm tmp/cache/myapp_cake_routes_route_collection
if you have trouble accessing http://api.tato.test:8080/ and http://api.tato.test:8080/unstable.Dev
This branch is installed on https://api.dev.tatoeba.org/, you can check the result there. The OpenAPI spec file can be used by other documentation tools as well, for instance Elements.