← Back to Pull requests

fix(typescript-axios): send non-object explode query params as a single value #25819

Closed
unknown closed this pull request without merging on Nov 25, 2026 13:44 UTC
View on GitHub
unknown unknown commented on Nov 25, 2026 08:49 UTC
Author

Since #16898 explode query param that is not primitive type goes through Object.entries. For oneOf of primitives (Cursor = number | string from #18999) that splits string into chars (cursor='abc' gives ?0=a&1=b&2=c) and drops numbers. Template cant tell these params apart from object ones: both have isModel and isAnyType, only composed schemas differ, so guard is at runtime, Object.entries only for non-null, non-array object, else value goes under param name

Checked built client at runtime: cursor='abc' and 7 now go as ?cursor=abc / ?cursor=7, object params (filter={x:'1'}, allOf and oneOf of objects) give same query as before. Added test in TypeScriptAxiosClientCodegenTest. Only echo_api typescript-axios sample changes

Fixes #18999

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
      

    Commit all changed files.
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.
  • @TiFu @taxpon @sebastianhaas @kenisteward @Vrolijkx @macjohnny @topce @akehir @petejohansonxo @amakhrov @davidgamero @mkusaka @joscha @KannaKim

    <!-- This is an auto-generated description by cubic. -->
    ---

    Summary by cubic


    Fixes typescript-axios explode query params so non-object values are sent as a single query parameter. Previously, oneOf params of primitive types (Cursor = number | string) were run through Object.entries, which split strings into characters (cursor='abc' → ?0=a&1=b&2=c) and dropped numbers.

  • Added a runtime check to spread with Object.entries only when the value is a non-null, non-array object; primitives and arrays are set directly under the param name.

  • Object params, including allOf and oneOf of objects, behave as before.

  • Added a regression test and updated the echo_api sample.
  • Fixes #18999.

    <sup>Written for commit 3ab1f8f30b6bd5fe00952410d7ba3978d47e8081. Summary will update on new commits.</sup>

    <a href="https://cubic.dev/pr/OpenAPITools/openapi-generator/pull/25819?utm_source=github" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true"><picture><source media="(prefers-color-scheme: dark)" srcset="https://www.cubic.dev/buttons/review-in-cubic-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://www.cubic.dev/buttons/review-in-cubic-light.svg"><img alt="View guided diff" src="https://www.cubic.dev/buttons/review-in-cubic-light.svg"></picture></a>

    <!-- End of auto-generated description by cubic. -->

    Diff: 375 lines (+281 / -94) across 4 files Reviewer: thekhegay Review duration: 295m
    All Vouch review confidence checks passed
    Residual risk 0.19 = Change Risk (0.48) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.48 · 375 lines diff across 4 files
    0.48
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.355
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #25819"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 47.9% (MEDIUM) · Higher = larger blast radius
    47.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 18.9% · Safe to merge
    18.9%