Skip to content

Map type with @RequestParam(required = false) in method isn't ignored #553

@dlamoris

Description

@dlamoris

Describe the bug
given this RestController method

@GetMapping
    public SomeType get(
        @PathVariable String path,
        @RequestParam(required = false) Map<String, String> params) {
    }

params is included in documentation

To Reproduce
Steps to reproduce the behavior:

  • What version of spring-boot you are using?
    2.1.7
  • What modules and versions of springdoc-openapi are you using?
    tried springdoc-openapi-ui 1.2.27 and 1.3.1
  • What is the actual and the expected result using OpenAPI Description (yml or json)?
    using 1.2.26, Map doesn't show up, it shows up in doc after from 1.2.27 on
  • Provide with a sample code (HelloController) or Test that reproduces the problem
@RestController
public class Controller {
    @GetMapping(value = "/get")
    public String get(@RequestParam Map<String, String> params) {
        return "healthy";
    }
}

Expected behavior
Map types in methods should be ignored

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions