Skip to content

Commit

Permalink
Update to swagger 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
skillor committed Apr 6, 2024
1 parent 5925738 commit 6d181c2
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions webserver/gen_openapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ def main():

file_path = os.path.join(top_level_dir, 'docs', 'openapi.json')
with open(file_path, 'w') as f:
json.dump(get_openapi(
title=app.title,
version=app.version,
openapi_version=app.openapi_version,
description=app.description,
routes=app.routes,
), f)
json.dump({
'swagger': '2.0',
**get_openapi(
title=app.title,
version=app.version,
openapi_version=app.openapi_version,
description=app.description,
routes=app.routes,
),
}, f)


if __name__ == '__main__':
Expand Down

0 comments on commit 6d181c2

Please sign in to comment.