forked from loafle/openapi-generator-original
[python] Encode list query params (#20148)
* Bugfix: #17688: Encode list query params * Test: #17688: Update validation error message tests for Pydantic 2.10+ Pydantic 2.10+ introduced changes to validation error messages, requiring updates to the affected test cases.
This commit is contained in:
@@ -518,7 +518,7 @@ class ApiClient:
|
||||
if k in collection_formats:
|
||||
collection_format = collection_formats[k]
|
||||
if collection_format == 'multi':
|
||||
new_params.extend((k, str(value)) for value in v)
|
||||
new_params.extend((k, quote(str(value))) for value in v)
|
||||
else:
|
||||
if collection_format == 'ssv':
|
||||
delimiter = ' '
|
||||
|
||||
@@ -518,7 +518,7 @@ class ApiClient:
|
||||
if k in collection_formats:
|
||||
collection_format = collection_formats[k]
|
||||
if collection_format == 'multi':
|
||||
new_params.extend((k, str(value)) for value in v)
|
||||
new_params.extend((k, quote(str(value))) for value in v)
|
||||
else:
|
||||
if collection_format == 'ssv':
|
||||
delimiter = ' '
|
||||
|
||||
Reference in New Issue
Block a user