From 632c224ec317621220d15d4acbd0c152f17cfc47 Mon Sep 17 00:00:00 2001 From: Alexandre Franke Date: Tue, 22 Feb 2022 19:09:41 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Warn=20of=20untagged=20operations?= =?UTF-8?q?=20(#3699)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexandre Franke Co-authored-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 e536ea85..82de8763 100755 --- a/scripts/dump-swagger.py +++ b/scripts/dump-swagger.py @@ -168,6 +168,7 @@ try: 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 @@ for filename in os.listdir(selected_api_dir): 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)