Skip to content

[0.17.53] form style query params incorrectly generated for resttemplate API client #986

@walaniam

Description

@walaniam

For query parameter like:

      - name: myPojo
        in: query
        required: true
        style: form
        explode: true
        schema:
          $ref: "#/components/schemas/MyPojo"

resttemplate client is generated like below, which is incorrect

localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "myPojo", myPojo));

Tested with openai genrator 7.4.0 it is generated like:

        if (myPojo != null) {
            localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "field1", myPojo.getField1()));
            localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "field2", myPojo.getField2()));
        }

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions