Skip to content

Commit c19be16

Browse files
committed
Merge branch 'patch-1' of https://github.com/joostsijm/openapi-generator into joostsijm-patch-1
2 parents 65df3c2 + a2d108e commit c19be16

File tree

3 files changed

+4
-4
lines changed
  • modules/openapi-generator/src/main/resources/python-pydantic-v1
  • samples
    • client/echo_api/python-pydantic-v1/openapi_client
    • openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api

3 files changed

+4
-4
lines changed

modules/openapi-generator/src/main/resources/python-pydantic-v1/api_client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ class ApiClient:
584584
if k in collection_formats:
585585
collection_format = collection_formats[k]
586586
if collection_format == 'multi':
587-
new_params.extend((k, str(value)) for value in v)
587+
new_params.extend((k, quote(str(value))) for value in v)
588588
else:
589589
if collection_format == 'ssv':
590590
delimiter = ' '

samples/client/echo_api/python-pydantic-v1/openapi_client/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def parameters_to_tuples(self, params, collection_formats):
509509
if k in collection_formats:
510510
collection_format = collection_formats[k]
511511
if collection_format == 'multi':
512-
new_params.extend((k, value) for value in v)
512+
new_params.extend((k, quote(value)) for value in v)
513513
else:
514514
if collection_format == 'ssv':
515515
delimiter = ' '
@@ -546,7 +546,7 @@ def parameters_to_url_query(self, params, collection_formats):
546546
if k in collection_formats:
547547
collection_format = collection_formats[k]
548548
if collection_format == 'multi':
549-
new_params.extend((k, str(value)) for value in v)
549+
new_params.extend((k, quote(str(value))) for value in v)
550550
else:
551551
if collection_format == 'ssv':
552552
delimiter = ' '

samples/openapi3/client/petstore/python-pydantic-v1-aiohttp/petstore_api/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def parameters_to_url_query(self, params, collection_formats):
516516
if k in collection_formats:
517517
collection_format = collection_formats[k]
518518
if collection_format == 'multi':
519-
new_params.extend((k, str(value)) for value in v)
519+
new_params.extend((k, quote(str(value))) for value in v)
520520
else:
521521
if collection_format == 'ssv':
522522
delimiter = ' '

0 commit comments

Comments
 (0)