Skip to content

Commit ef18833

Browse files
committed
Improved check_outdated script
1 parent 69677be commit ef18833

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

scripts/check_outdated.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def get_all_endpoints():
1515

1616
endpoints.append(root.split(ENDPOINTS_DIR)[1] + "/" + file[:-4])
1717

18+
endpoints.sort()
1819
return endpoints
1920

2021
def get_all_documented_endpoints():
@@ -31,11 +32,20 @@ def get_all_documented_endpoints():
3132

3233
endpoints.append(match.group(1))
3334

35+
endpoints.sort()
3436
return endpoints
3537

36-
print(get_all_endpoints())
37-
print(get_all_documented_endpoints())
38+
if __name__ == "__main__":
39+
endpoints = get_all_endpoints()
40+
documented_endpoints = get_all_documented_endpoints()
3841

39-
print()
42+
# Show endpoints that are not documented and endpoints that have been removed
43+
print("Undocumented endpoints:")
44+
for endpoint in endpoints:
45+
if endpoint not in documented_endpoints and not endpoint.startswith("/status/"):
46+
print(f" - {endpoint}")
4047

41-
print(set(get_all_endpoints()) ^ set(get_all_documented_endpoints()))
48+
print("Removed endpoints:")
49+
for endpoint in documented_endpoints:
50+
if endpoint not in endpoints:
51+
print(f" - {endpoint}")

0 commit comments

Comments
 (0)