OpenRailAssociation / osrd-website

OSRD website (work in progress)
https://osrd.fr/
4 stars 12 forks source link

Re-introduce APIs section #213

Closed emersion closed 3 months ago

emersion commented 3 months ago

It seems like the APIs section has been removed in 3de3e8c95c73. However I found it quite handy to be able to quickly access a webpage describing the API.

It appears like there were two issues with the previous approach: the OpenAPI schema was locally duplicated (making it often times outdated and cumbersome to keep in sync), and the swagger-ui integration needed a dedicated Hugo plugin.

Directly download the OpenAPI schema from GitHub instead of keeping a copy, and use a HTML template for swagger-ui instead of a plugin. This should make it easier to maintain.


Is this an acceptable approach? Were there other reasons why the APIs section has been dropped in the first place?

flomonster commented 3 months ago

Were there other reasons why the APIs section has been dropped in the first place?

The main reason for removing the functionality was the file copy and the impossibility of synchronizing it.