mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 09:47:11 +00:00
avoid intersection type (#21378)
avoid intersection type by splitting the statements into separate code-branches. for each branch the type of `value` is therefor no longer an intersection Fixes https://github.com/OpenAPITools/openapi-generator/issues/20636
This commit is contained in:
@@ -365,8 +365,11 @@ open class ApiClient(val baseUrl: String, val client: Call.Factory = defaultClie
|
||||
null -> ""
|
||||
is Array<*> -> toMultiValue(value, "csv").toString()
|
||||
is Iterable<*> -> toMultiValue(value, "csv").toString()
|
||||
is OffsetDateTime, is OffsetTime, is LocalDateTime, is LocalDate, is LocalTime ->
|
||||
parseDateToQueryString(value)
|
||||
is OffsetDateTime -> parseDateToQueryString(value)
|
||||
is OffsetTime -> parseDateToQueryString(value)
|
||||
is LocalDateTime -> parseDateToQueryString(value)
|
||||
is LocalDate -> parseDateToQueryString(value)
|
||||
is LocalTime -> parseDateToQueryString(value)
|
||||
else -> value.toString()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user