Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fastapi-generate-openapi-specification.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ def main() -> None:

new_spec = app.openapi()

with open(args.spec_file_path) as f:
old_spec = json.load(f)
try:
with open(args.spec_file_path) as f:
old_spec = json.load(f)
except Exception:
old_spec = None

should_update_spec = old_spec != new_spec

Expand Down