Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore trailing slashes for server url #375

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 2 additions & 1 deletion kubernetes/client/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def __call_api(self, resource_path, method,
body = self.sanitize_for_serialization(body)

# request url
url = self.configuration.host + resource_path
# ignore trailing slashes in base url
url = self.configuration.host.rstrip('/') + resource_path
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if we should modify this file. It's generated by swagger-codegen (see the preamble of this file). @karlbunch suggested different solution (#388) - to fix the value when configuration object is created. How does it look?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't seen that notice. I thought about fixing this in configuration handling code too, but then rejected that idea. This approach isn't solving issue completely, since there is possibility that user will create configuration object manually (in python code).


# perform request and return response
response_data = self.request(method, url,
Expand Down