-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationtechdebt
Description
As mentioned in other issues (such as #2040 and #2092), the new system lacks documentation for both users and developers.
A first step in solving this problem could be to look at auto-generation for items easily documented in the code itself. this includes:
kci
commands- API endpoints
fastapi
already provides some kind of endpoint/schema documentation, but it's incomplete and barely usable; we could, however, have a look at how this works and get some inspiration there
- Node types & formats
- Partly provided by
fastapi
(see above) but only documents the top-levelNode
model, not any of its sub-classes - We could create a script which would leverage pydantic's schema() creation facilities, see the following PoC for an example:
- Partly provided by
import kernelci, inspect
from kernelci.api.models import *
def iskcimodel(model):
if (inspect.isclass(model) and
model.__module__ == "kernelci.api.models" and
hasattr(model, 'schema')):
return True
return False
for name, myclass in inspect.getmembers(kernelci.api.models, iskcimodel):
print(f"{name} -> {myclass.schema()}")
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationtechdebt
Type
Projects
Status
No status