title: Swagger declaration schema = @Schema(implementation = Map.class) represents Schema as String in swagger-ui
body: <p>I am trying to create <code>springdoc</code> swagger documentation, and I would like to represent a request body having data type <code>Map&lt;String, Object&gt;</code> in a better readable way for clients. But when I declare <code>@io.swagger.v3.oas.annotations.parameters.RequestBody(content = @Content(schema = @Schema(implementation = Map.class)</code> the Schema is coming as <code>String</code>(attached the screenshot below)</p>
  <p><a href="https://i.stack.imgur.com/8BY0G.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8BY0G.png" alt="enter image description here" /></a></p>
  <p><strong>Method declaration</strong></p>
  <pre><code>        @Operation(security = {@SecurityRequirement(name = &quot;bearer-key&quot;)}, summary = &quot;Create Data&quot;, operationId = &quot;createData&quot;, description = &quot;Create createData for the **`type`**. &quot;)
      @ApiResponses(value = {
              @ApiResponse(responseCode = &quot;201&quot;, description = &quot;Data created&quot;, content = @Content(schema = @Schema(implementation = Map.class),
                      examples = {@ExampleObject(value = &quot;{\n&quot; +
                              &quot;    \&quot;id\&quot;: \&quot;927d810c-3ac5-4584-ba58-7c11befabf54\&quot;,\n&quot; +
                              &quot;}&quot;)})),
              @ApiResponse(responseCode = &quot;400&quot;, description = &quot;BAD Request&quot;)})
      @PostMapping(value = &quot;/data/type&quot;, produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
      @io.swagger.v3.oas.annotations.parameters.RequestBody(content = @Content(schema = @Schema(implementation = Map.class),
              examples = {@ExampleObject(value = &quot;{\n&quot; +
                      &quot;            \&quot;label\&quot;:\&quot;tourism\&quot;,\n&quot; +
                      &quot;            \&quot;location\&quot;:\&quot;France\&quot;\n&quot; +
                      &quot;         }&quot;)}))
      ResponseEntity&lt;Map&lt;String, Object&gt;&gt; createData(@Parameter(name = &quot;type&quot;, required = true) @PathVariable(&quot;type&quot;) String type, @Parameter(name = &quot;request payload&quot;) @Valid @RequestBody Map&lt;String, Object&gt; body);
  
  </code></pre>
  <p>Though the Spring boot automatically infers the type based on the method signature, it is not clear for the data type <code>Map</code>. For instance, by default, the type Map&lt;String, Object&gt; will be inferred as below
  <a href="https://i.stack.imgur.com/4MJf1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4MJf1.png" alt="enter image description here" /></a></p>
  <p>But I would like to show the Schema in a more understandable way for the client who refers to my API. I could see there is a closed ticket without a proper solution in <a href="https://github.com/swagger-api/swagger-core/issues/3439" rel="nofollow noreferrer">Github</a>. As per my requirement, the request body should be a type agnostic and dynamic key-value pairs, so there is no other way apart from receiving the request as <code>Map&lt;String, Object&gt;</code>. has anyone implemented a better way with type <code>Map</code> rather than creating a custom request/response model?</p>