Skip to content

Commit

Permalink
Updated fetch version 2 identification
Browse files Browse the repository at this point in the history
  • Loading branch information
u8sand committed Oct 12, 2018
1 parent 86d9ec1 commit b56fcd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyswaggerclient/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def fetch_spec(spec_url, **kwargs):
)
)
spec = read_spec(req)
if spec.get('swagger') == 2:
if spec.get('swagger', '').startswith('2'):
return get_spec_v2(spec)
if spec.get('openapi', '').startswith('3'):
return get_spec_v3(spec)
Expand Down

0 comments on commit b56fcd4

Please sign in to comment.