Skip to content

[BUG] Query Parameter Serialization (Spring) #2655

@jarpz

Description

@jarpz
Description

Given a query param complex object.

using v4.0.0-SNAPSHOT: parameter class is generated but is not linked in the rest-controller. Also to works correctly is necessary remove @RequestParam annotation when style=form & explode: true

openapi-generator version

4.0.0beta2

parameters:
        - in: query
          name: pageQuery
          schema:
            type: object
            properties:
              offset:
                type: integer
                format: int32
              limit:
                type: integer
                format: int32

-->

Command line used for generation
java -jar openapi-generator-cli-4.0.0-SNAPSHOT.jar generate -i openapi.yaml -g spring -o test --additional-properties=library=spring-boot,beanValidations=true,reactive=true
Steps to reproduce

Create a open api specification with a query param with complex object as described above.

Suggest a fix

Using version 4.0.0 version should link generated pojo class in rest-controller instead of "object" also remove @RequestParam annotation to works correctly.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions