Skip to content

[typescript-axios] doesn't serialize deepObject query params #7564

@wamujlb

Description

@wamujlb

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
    input: {day: 20, year: {min: 1990, max: 2000}}
    actual output: ?day=20&year
    expected output: ?day=20&year[min]=1990&year[max]=2000
Description

I'm using [typescript-axios] api client generator. Some of the properties I pass to it specified as deepObject. It looks that it doesn't support this type of args at all. Is there any possible ways to fix it?

openapi-generator version

v4.3.1
v5.0.0-beta

OpenAPI declaration file content or url
YearRange:
      in: query
      name: year
      required: false
      style: deepObject
      schema:
        type: object
        properties:
          min:
            type: string
            example: 2010
          max:
            type: string
            example: 2019
Generation Details

[typescript-axios] generator

Steps to reproduce
Related issues/PRs

#6075

Suggest a fix

Replace old deprecated url API with URLSearchParams.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions