mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-06 13:56:11 +00:00
Fix issue 8352: [Java][RestTemplate][WebClient] Incorrect handling of free form query parameters (#10428)
* [Java][RestTemplate][WebClient] fix issue #8352 handling of free-form query parameters with Java * replace tab by spaces * commit samples files generated by the generate-samples.sh script
This commit is contained in:
@@ -435,6 +435,14 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
collectionFormat = CollectionFormat.CSV;
|
||||
}
|
||||
|
||||
if (value instanceof Map) {
|
||||
final Map<String, Object> valuesMap = (Map<String, Object>) value;
|
||||
for (final Entry<String, Object> entry : valuesMap.entrySet()) {
|
||||
params.add(entry.getKey(), parameterToString(entry.getValue()));
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
Collection<?> valueCollection = null;
|
||||
if (value instanceof Collection) {
|
||||
valueCollection = (Collection<?>) value;
|
||||
|
||||
Reference in New Issue
Block a user