Skip to content

[BUG] [Java] [vertx] supportVertxFuture incompatible with vertx 5 #23659

@RickyRister

Description

@RickyRister

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator?
  • 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

Vertx 5 support was added in #23563. However, the supportVertxFuture option is incompatible with the useVertx5 option.

The generated code will fail to compile because vertx changed its interfaces in the bump from 4 to 5. Promise no longer extends Handler, which means we can no longer directly pass a promise into a param that expects a handler.

openapi-generator version

7.22.0

OpenAPI declaration file content or url

This sample is basically just the vertx5 sample but with the addition of the supportVertxFuture option. It will generate code that fails to compile.

Generation Details

After generating the sample code, attempting to compile the generate code with mvn clean install will reproduce the problem.

Steps to reproduce
  1. Add the supportVertxFuture option to the vertx5 sample config (like [this](vertx5 sample))
  2. Run generate-samples.sh
  3. Go to the generated sample code.
  4. Run the command mvn clean install
  5. Generated code will fail to compile because Promise no longer extends Handler
Related issues/PRs

None found

Suggest a fix

We need to update vertx/api.mustache to no longer directly pass the promise into the handler param.

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