Skip to content

#23560 Correct imports for RxJava2 and RxJava3. Add support for Vert.x 5. #23563

Open
sjw2547 wants to merge 4 commits intoOpenAPITools:masterfrom
sjw2547:master
Open

#23560 Correct imports for RxJava2 and RxJava3. Add support for Vert.x 5. #23563
sjw2547 wants to merge 4 commits intoOpenAPITools:masterfrom
sjw2547:master

Conversation

@sjw2547
Copy link
Copy Markdown

@sjw2547 sjw2547 commented Apr 15, 2026

The mustache template for rxApiImpl, when working with Rx Java 2 and 3, imports rx.Single. This class is relocated with Rx Java 2 and 3, import has been corrected for those versions, along with using SingleHelper instead of Single.create()

For Vert.x 5 the generated ApiClient does not compile because the deprecated methods in Vert.x 4 that take a handler as a final parameter have been removed, returning a furutre instead. Added a new command line option called useVertx5 to call the replacement methods instead.


Summary by cubic

Fixes incorrect RxJava imports in generated Vert.x Rx clients and adds Vert.x 5 support via a new useVertx5 option, so Java clients compile against Vert.x 5 while keeping Vert.x 4 compatibility. Adds a Vert.x 5 sample and minor whitespace cleanup.

  • New Features

    • Added useVertx5 (--additional-properties useVertx5=true) to generate Vert.x 5 syntax in ApiClient (Future-based send, sendForm, file I/O, and sendBody); updated docs and added bin/configs/java-vertx5.yaml plus a new sample at samples/client/petstore/java/vertx5.
    • Default remains Vert.x 4: handler-based paths are used when useVertx5 is false.
  • Bug Fixes

    • Corrected RxJava imports in rxApiImpl.mustache: use io.reactivex.Single/io.reactivex.rxjava3.core.Single and io.vertx.reactivex.SingleHelper/io.vertx.rxjava3.SingleHelper; replaced Single.create with SingleHelper.toSingle for RxJava2/3.
    • Removed unnecessary whitespace in generated ApiClient samples.

Written for commit 1a674d6. Summary will update on new commits.

…rt for Vert.x 5 while keeping backward compatibility for earlier versions. Add new parameter for useVertx5.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

@sjw2547 sjw2547 changed the title Correct imports for RxJava2 and RxJava3. Add support for Vert.x 5. (#23560) #23560 Correct imports for RxJava2 and RxJava3. Add support for Vert.x 5. Apr 15, 2026
@wing328
Copy link
Copy Markdown
Member

wing328 commented Apr 16, 2026

please follow step 3 to update samples and docs.

@sjw2547
Copy link
Copy Markdown
Author

sjw2547 commented Apr 16, 2026

please follow step 3 to update samples and docs.

Done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants