Skip to content

[BUG] Query Parameter Serialization (Spring) #2655

Closed

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.

Activity

  1. auto-labeler commented on Apr 12, 2019

    @auto-labeler

    👍 Thanks for opening this issue!
    🏷 I have applied any labels matching special text in your issue.

    The team will review the labels and make any necessary changes.

  2. added a commit that references this issue on May 22, 2019
    bcee5d5
  3. added a commit that references this issue on Jun 5, 2019
    146c1fb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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