Skip to content

Commit

Permalink
Strip basePath trailing slash if present
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
u8sand committed Jan 23, 2019
1 parent 93ab6bc commit 4b37a09
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pyswaggerclient/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def repair_spec(spec_v2):
# Update the spec
spec_v2['paths'][path][method]['operationId'] = op_id

spec_v2['basePath'] = '/' if spec_v2['basePath'] == '/' else spec_v2['basePath'].rstrip('/')

return spec_v2

def parse_spec(spec_file):
Expand Down

0 comments on commit 4b37a09

Please sign in to comment.