feat: helper for generating module docstrings

This commit is contained in:
Chris Milne 2026-06-11 09:57:34 +01:00
parent dd0478d5e7
commit c268097306

View file

@ -167,11 +167,25 @@ def get_testable_routes():
if method in {"HEAD", "OPTIONS"}:
continue
routes.append((method, route.path, route.status_code, route.response_model))
routes.append(
(
method,
route.path,
route.status_code,
route.response_model,
route.summary,
)
)
return routes
# with open("endpoints.txt", "w") as f:
# for ep in get_testable_routes():
# f.write(f"[{ep[0]}]{ep[1]}({ep[2]}) -> {ep[2]}: {ep[3]}\n")
# f.write(f"[{ep[0]}]({ep[1]}) -> {ep[2]}: {ep[3]}\n")
#
#
### Docstring formatted output ###
# with open("endpoints.txt", "w") as f:
# for ep in get_testable_routes():
# f.write(f"- [{ep[0]}]({ep[1]}): []: {ep[4]}\n")