Skip to content

Conversation

geekerzp
Copy link
Contributor

No description provided.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When calling the method toPathValue on the query parameters, the query parameters will be urlencoded.
But in swagger.mustache 60 line,

if queryParams:
      # Need to remove None values, these should not be sent
      sentQueryParams = {}
      for param, value in queryParams.items():
        if value is not None:
          sentQueryParams[param] = ApiClient.sanitizeForSerialization(value)
      url = url + '?' + urllib.urlencode(sentQueryParams)

will urlencode query parameters again.
The query parameter will be double urlencoded.

fehguy added a commit that referenced this pull request Mar 30, 2015
Fixed issue that query parameters double url encoded in python client
@fehguy fehguy merged commit 1e7862a into swagger-api:develop_2.0 Mar 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants