mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
fixed issue that query parameters double url encoded
This commit is contained in:
parent
517c0a4f52
commit
8f6afda99a
@ -19,6 +19,7 @@ NOTE: This class is auto generated by the swagger code generator program. Do not
|
||||
"""
|
||||
import sys
|
||||
import os
|
||||
import urllib
|
||||
|
||||
from models import *
|
||||
|
||||
@ -78,6 +79,7 @@ class {{classname}}(object):
|
||||
{{#pathParams}}
|
||||
if ('{{paramName}}' in params):
|
||||
replacement = str(self.apiClient.toPathValue(params['{{paramName}}']))
|
||||
replacement = urllib.quote(replacement)
|
||||
resourcePath = resourcePath.replace('{' + '{{baseName}}' + '}',
|
||||
replacement)
|
||||
{{/pathParams}}
|
||||
|
@ -103,9 +103,9 @@ class ApiClient(object):
|
||||
string -- quoted value
|
||||
"""
|
||||
if type(obj) == list:
|
||||
return urllib.quote(','.join(obj))
|
||||
return ','.join(obj)
|
||||
else:
|
||||
return urllib.quote(str(obj))
|
||||
return str(obj)
|
||||
|
||||
@staticmethod
|
||||
def sanitizeForSerialization(obj):
|
||||
|
Loading…
Reference in New Issue
Block a user