[kotlin-client] fix collection delimiter - #24900
Conversation
There was a problem hiding this comment.
1 issue found across 54 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt">
<violation number="1" location="samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt:8">
P2: The delimiter fix was applied to the template and to this sample, but six other Kotlin-generated samples were not regenerated and still contain the old broken values. Only one ApiAbstractions.kt.mustache exists under kotlin-client resources and it now emits `pipes`/`ssv`, yet `samples/openapi3/client/petstore/kotlin/src/main/kotlin/.../ApiAbstractions.kt`, `samples/openapi3/client/petstore/kotlin-multiplatform/...`, `samples/client/echo_api/kotlin-jvm-okhttp-multipart-json/...`, `samples/client/petstore/kotlin-array-simple-string-multiplatform/...`, `samples/client/petstore/kotlin-bigdecimal-default-multiplatform/...`, and `samples/client/petstore/kotlin-default-values-multiplatform/...` still have `"pipe" -> "|"` and `"space" -> " "`. Because CI re-runs the sample generators and diffs the output, these six committed samples will not match the regenerated result and CI will fail; the committed clients also still carry the delimiter bug. Regenerate all Kotlin samples, not just this one.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
| "tsv" -> "\t" | ||
| "pipe" -> "|" | ||
| "space" -> " " | ||
| "pipes" -> "|" |
There was a problem hiding this comment.
P2: The delimiter fix was applied to the template and to this sample, but six other Kotlin-generated samples were not regenerated and still contain the old broken values. Only one ApiAbstractions.kt.mustache exists under kotlin-client resources and it now emits pipes/ssv, yet samples/openapi3/client/petstore/kotlin/src/main/kotlin/.../ApiAbstractions.kt, samples/openapi3/client/petstore/kotlin-multiplatform/..., samples/client/echo_api/kotlin-jvm-okhttp-multipart-json/..., samples/client/petstore/kotlin-array-simple-string-multiplatform/..., samples/client/petstore/kotlin-bigdecimal-default-multiplatform/..., and samples/client/petstore/kotlin-default-values-multiplatform/... still have "pipe" -> "|" and "space" -> " ". Because CI re-runs the sample generators and diffs the output, these six committed samples will not match the regenerated result and CI will fail; the committed clients also still carry the delimiter bug. Regenerate all Kotlin samples, not just this one.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt, line 8:
<comment>The delimiter fix was applied to the template and to this sample, but six other Kotlin-generated samples were not regenerated and still contain the old broken values. Only one ApiAbstractions.kt.mustache exists under kotlin-client resources and it now emits `pipes`/`ssv`, yet `samples/openapi3/client/petstore/kotlin/src/main/kotlin/.../ApiAbstractions.kt`, `samples/openapi3/client/petstore/kotlin-multiplatform/...`, `samples/client/echo_api/kotlin-jvm-okhttp-multipart-json/...`, `samples/client/petstore/kotlin-array-simple-string-multiplatform/...`, `samples/client/petstore/kotlin-bigdecimal-default-multiplatform/...`, and `samples/client/petstore/kotlin-default-values-multiplatform/...` still have `"pipe" -> "|"` and `"space" -> " "`. Because CI re-runs the sample generators and diffs the output, these six committed samples will not match the regenerated result and CI will fail; the committed clients also still carry the delimiter bug. Regenerate all Kotlin samples, not just this one.</comment>
<file context>
@@ -5,8 +5,8 @@ typealias MultiValueMap = MutableMap<String,List<String>>
"tsv" -> "\t"
- "pipe" -> "|"
- "space" -> " "
+ "pipes" -> "|"
+ "ssv" -> " "
else -> ""
</file context>
The collection delimiter was mismatched.
DefaultCodegen.getCollectionFormat()returnspipes, but the Kotlin template usedpipe.PR checklist
Commit all changed files.
This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
These must match the expectations made by your contribution.
You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example
./bin/generate-samples.sh bin/configs/java*.IMPORTANT: Do NOT purge/delete any folders/files (e.g. tests) when regenerating the samples as manually written tests may be removed.
@karismann @Zomzog @andrewemery @4brunu @yutaka0m @stefankoppier @e5l