Skip to content

[kotlin-client] fix collection delimiter - #24900

Open
WonderCsabo wants to merge 1 commit into
OpenAPITools:masterfrom
team-supercharge:kotlin-client-collection-delimiter
Open

[kotlin-client] fix collection delimiter#24900
WonderCsabo wants to merge 1 commit into
OpenAPITools:masterfrom
team-supercharge:kotlin-client-collection-delimiter

Conversation

@WonderCsabo

@WonderCsabo WonderCsabo commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

The collection delimiter was mismatched. DefaultCodegen.getCollectionFormat() returns pipes, but the Kotlin template used pipe.

PR checklist

  • Read the contribution guidelines.
  • Run the following to build the project and update samples:
    ./mvnw clean package || exit
    ./bin/generate-samples.sh ./bin/configs/*.yaml || exit
    ./bin/utils/export_docs_generators.sh || exit
    
    (For Windows users, please run the script in WSL)
    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.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

@karismann @Zomzog @andrewemery @4brunu @yutaka0m @stefankoppier @e5l

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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" -> "|"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants