Skip to content

[BUG] [JAVA] [SPRING] Map type request body incorrect in reactive spring #8045

Description

@ajithalbus

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • Have you tested with the latest master to confirm the issue still exists?
  • Have you searched for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

Map types spec described with additionalProperties are generated incorrectly in spring reactive server code.
Example -

  • OAI spec
...
requestBody:
  description: request
  content:
    application/json:
      schema:
        type: object
        additionalProperties:
          $ref: '#/components/schemas/DummyRequest'
...
  • Generated code (for spring server with reactive="true")
... @Valid @RequestBody Mono<DummyRequest> requestBody, ...
  • Expected code (for spring server with reactive="true")
... @Valid @RequestBody Mono<Map<String, DummyRequest>> requestBody, ...
openapi-generator version

v5.0.0-beta3

Generation Details
generatorName = "spring"
reactive = "true"
Suggest a fix

The template need to be updated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    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