Skip to content

Commit bfcf333

Browse files
authored
openapi: add reference to the swagger editor (#157)
1 parent d5386c8 commit bfcf333

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: .github/convert_gitbook.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def process_yaml(yaml_file, version):
2424
tags[tag] = [generated_entry]
2525
else:
2626
tags[tag].append(generated_entry)
27-
print_all(tags)
27+
print_all(tags, version)
2828

2929
def generate_gitbook(path, method, version):
3030
url = f'https://raw.githubusercontent.com/terminusdb/terminusdb/{version}/docs/openapi.yaml'
@@ -36,8 +36,10 @@ def generate_gitbook(path, method, version):
3636
'''
3737

3838

39-
def print_all(tags):
39+
def print_all(tags, version):
4040
print("# HTTP API\n")
41+
swagger_url = f"https://editor.swagger.io/?url=https://raw.githubusercontent.com/terminusdb/terminusdb/{version}/docs/openapi.yaml"
42+
print(f"View the HTTP API docs on the [Swagger editor interface]({swagger_url}) as well. It has a better UI\n")
4143
for tag, values in tags.items():
4244
print(f"## {tag}")
4345
for entry in values:

0 commit comments

Comments
 (0)