mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-12-16 08:36:19 +00:00
Add API documentation generation and use Markdown (#160)
* Add package API documentation generation Add generation of the API documentation for akkudoktoreos and akkudoktoreosserver packages. The API documentation is generated by the Sphinx autosummary extension. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com> * Enable Google style source commenting and documentation generation. Enable automatic documentation generation from Google style docstrings in the source. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com> * Check Google style source commenting. Check Google style commenting by the appropriate ruff rules. Commenting is _NOT_ enforced. Missing docstrings are ignored. Minor commenting quirks of the code base are adapted. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com> * Improve Markdown handling and switch to Markdown documentation. Switch to Markdown for the documentation files to improve the user and developer experience (see issue #181). Keep files with special directives for automatic API documentation in RST format. The directives expect RST. Also add dummy handling for openai/ swagger server documentation. The openai interface definition is for now taken from the fastapi PR as EOS will switch to fastAPI. Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com> --------- Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com> Co-authored-by: Normann <github@koldrack.com>
This commit is contained in:
17
docs/akkudoktoreosserver/serverapi.rst
Normal file
17
docs/akkudoktoreosserver/serverapi.rst
Normal file
@@ -0,0 +1,17 @@
|
||||
..
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
File has to be of RST format to make openapi directive work correctly
|
||||
|
||||
.. _akkudoktoreos_server_api:
|
||||
|
||||
Server API
|
||||
##########
|
||||
|
||||
For a more detailed documentation see the Swagger interface: `EOS OpenAPI Spec <https://petstore3.swagger.io/?url=https://raw.githubusercontent.com/Akkudoktor-EOS/EOS/refs/heads/main/openapi.json>`_
|
||||
|
||||
.. openapi:: openapi.json
|
||||
:examples:
|
||||
|
||||
..
|
||||
Due to bugs in sphinxcontrib-openapi referenced request/response objects fail to render and anyOf is broken too.
|
||||
:request:
|
||||
Reference in New Issue
Block a user