chairemobilite / transition

Transition is a modern new approach to transit planning. It's a web application to model, simulate and plan public transit and alternative transportation.
http://transition.city
MIT License
20 stars 13 forks source link

Added documentation for public API endpoints with Redocly and added explicit response types for endpoints #902

Closed shymkom45 closed 2 months ago

shymkom45 commented 2 months ago

The documentation for the public API is in the docs/APIv1 folder in various YAML files written under the OpenAPI specification. This documentation can be displayed in a Redocly UI using the docs/index.html file. The response formats for all API endpoints have also been made more explicit in the code through the use of classes inheriting from APIResponseBase and the definition of response types.

shymkom45 commented 2 months ago

Nous avons fait un déploiement de la documentation avec GitHub Pages sur notre fork pour avoir un aperçu. Vous pouvez le voir ici: https://mathildebrosseau.github.io/transition-api/

greenscientist commented 2 months ago

J'ai regardé vite vite. Y'a de la doc, je suis content.

C'est documenté comment on génère la doc ou bien c'est un truc automagique de github?

greenscientist commented 2 months ago

Peut-etre pour une discussion plus tard: pour le token, on ne devrait pas plutot utiliser /api/token comme path plutot que /token directement?

tahini commented 2 months ago

Pour la génération de doc, on le fait déjà pour trRouting, c'est semi-automagique, faut juste se rappeler où aller cocher une case. @shymkom45 comme vous l,avez fait récemment, c'est probablement plus frais à votre mémoire. On peut regarder ça vitement demain si c'est pas fait d'ici là.

shymkom45 commented 2 months ago

Oui c'est très simple à déployer avec GitHub Pages, on peut s'en parler demain!