Skip to content

Commit

Permalink
✨ Warn of untagged operations (matrix-org#3699)
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>

Co-authored-by: Alexandre Franke <alexandre.franke@matrix.org>
  • Loading branch information
2 people authored and turt2live committed May 9, 2022
1 parent 9b0bd09 commit 632c224
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/dump-swagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ def edit_links(node, base_url):
except FileNotFoundError:
print("No security definitions available for this API")

untagged = 0
for filename in os.listdir(selected_api_dir):
if not filename.endswith(".yaml"):
continue
Expand All @@ -185,6 +186,11 @@ def edit_links(node, base_url):
if path not in output["paths"]:
output["paths"][path] = {}
output["paths"][path][method] = spec
if "tags" not in spec.keys():
print("Warning: {} {} is not tagged ({}).".format(method.upper(), path, filename))
untagged +=1
if untagged != 0:
print("{} untagged operations, you may want to look into fixing that.".format(untagged))

edit_links(output, base_url)

Expand Down

0 comments on commit 632c224

Please sign in to comment.