forked from loafle/openapi-generator-original
Kotlin query collection format (#4248)
* Fixes incorrect query header collection constants The OpenApi codegen converts OpenApi v2 documents into an OpenApi v3 representation. The query parameter collection formats are squeezed into different values from the raw OpenApi 2 collection format values. For example: csv -> space See: DefaultCodegen#getCollectionFormat * Updates kotlin samples
This commit is contained in:
parent
c8465c40ff
commit
a2b37d67c0
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
{{#nonPublicApi}}internal {{/nonPublicApi}}fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
{{#nonPublicApi}}internal {{/nonPublicApi}}fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
internal fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
internal fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
|
|||||||
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
fun collectionDelimiter(collectionFormat: String) = when(collectionFormat) {
|
||||||
"csv" -> ","
|
"csv" -> ","
|
||||||
"tsv" -> "\t"
|
"tsv" -> "\t"
|
||||||
"pipes" -> "|"
|
"pipe" -> "|"
|
||||||
"ssv" -> " "
|
"space" -> " "
|
||||||
else -> ""
|
else -> ""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user