From fe996401f5bb7f134001b06d87cb723caeb1db90 Mon Sep 17 00:00:00 2001 From: Alexandre Franke Date: Thu, 3 Feb 2022 14:46:56 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Warn=20of=20untagged=20operations?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexandre Franke --- scripts/dump-swagger.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/dump-swagger.py b/scripts/dump-swagger.py index e536ea8580..82de87631f 100755 --- a/scripts/dump-swagger.py +++ b/scripts/dump-swagger.py @@ -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 @@ -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)