BeamMP / BeamMP-Server

Server for the multiplayer mod BeamMP for BeamNG.drive
https://beammp.com
GNU Affero General Public License v3.0
119 stars 52 forks source link

Write documentation for the Lua API and generate markdown for the docs #354

Open lionkor opened 1 month ago

lionkor commented 1 month ago

Related to BeamMP/BeamMP-Server#355. Basically, we want to generate the Lua Docs page from the LuaAPI.cpp or LuaAPI.h file. This can be a script, it can use doxygen, it can use whatever.

It needs to:

carsakiller commented 1 month ago

As mentioned before, I would be interested in helping writing definition files for the API for use with the Lua Language Server. The definition files could be generated at the same time as the markdown to make things easier to maintain and more consistent.

We could potentially write all the documentation using LuaCATS annotations and then use the export documentation feature of the language server to generate JSON and Markdown from the definition files. Although this would require some testing.

The other option is to define the entire API in JSON/XML/YAML and then generate the Markdown and LuaCATS annotations from that. It would allow more customization and control, but would also require a custom script.