OpenAPITools / OpenAPITools/openapi-generator

[BUG] typescript-axios query parameter is empty when type is an array of object

Open
#5,032 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Bug Report Checklist
  • Have you provided a full/minimal spec to reproduce the issue?
    Send a request with an array of object in query parameter and be able to find that the value of that query parameter is empty
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
    3
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
    Actual output:
?where=

Expected output: array of object should be stringify and encoded.

?where=%7B%22id%22%3A1%7D
  • [Optional] Bounty to sponsor the fix (example)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with the typescript-axios generator and an array of objects in a query parameter. Trace the generated client’s query-parameter serialization, then verify that the resulting request contains the encoded object value rather than an empty parameter; no source file or test is identified in the report.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.