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
2 changes: 2 additions & 0 deletions openapi2jsonschema/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ def default(output, schema, prefix, stand_alone, expanded, kubernetes, strict):
version = data["swagger"]
elif "openapi" in data:
version = data["openapi"]
else:
raise ValueError("cannot convert data to JSON because we could not find 'openapi' or 'swagger' keys")

if not os.path.exists(output):
os.makedirs(output)
Expand Down