✨ Warn of untagged operations (#3699)
Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org> Co-authored-by: Alexandre Franke <alexandre.franke@matrix.org>
This commit is contained in:
parent
9b0bd0917d
commit
632c224ec3
1 changed files with 6 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue