forked from loafle/openapi-generator-original
[Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolve #16506) (#19999)
* [Kotlin] Properly document nonPublicApi CLI option * [Kotlin] Respect parameter name of parent KSerializer to avoid miss-behavior * [Kotlin] Introduce support for Kotlin Explicit API Mode for Kotlin-Client generator (resolves #16506)
This commit is contained in:
@@ -2,7 +2,7 @@ package org.openapitools.client.infrastructure
|
||||
|
||||
typealias MultiValueMap = MutableMap<String,List<String>>
|
||||
|
||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||
fun collectionDelimiter(collectionFormat: String): String = when(collectionFormat) {
|
||||
"csv" -> ","
|
||||
"tsv" -> "\t"
|
||||
"pipe" -> "|"
|
||||
@@ -12,7 +12,7 @@ fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||
|
||||
val defaultMultiValueConverter: (item: Any?) -> String = { item -> "$item" }
|
||||
|
||||
fun <T : Any?> toMultiValue(items: Array<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter)
|
||||
fun <T : Any?> toMultiValue(items: Array<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List<String>
|
||||
= toMultiValue(items.asIterable(), collectionFormat, map)
|
||||
|
||||
fun <T : Any?> toMultiValue(items: Iterable<T>, collectionFormat: String, map: (item: T) -> String = defaultMultiValueConverter): List<String> {
|
||||
|
||||
Reference in New Issue
Block a user