feat: helper for generating module docstrings
This commit is contained in:
parent
dd0478d5e7
commit
c268097306
1 changed files with 16 additions and 2 deletions
|
|
@ -167,11 +167,25 @@ def get_testable_routes():
|
||||||
if method in {"HEAD", "OPTIONS"}:
|
if method in {"HEAD", "OPTIONS"}:
|
||||||
continue
|
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
|
return routes
|
||||||
|
|
||||||
|
|
||||||
# with open("endpoints.txt", "w") as f:
|
# with open("endpoints.txt", "w") as f:
|
||||||
# for ep in get_testable_routes():
|
# 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")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue