#23560 Correct imports for RxJava2 and RxJava3. Add support for Vert.x 5. #23563
Open
sjw2547 wants to merge 4 commits intoOpenAPITools:masterfrom
Open
#23560 Correct imports for RxJava2 and RxJava3. Add support for Vert.x 5. #23563sjw2547 wants to merge 4 commits intoOpenAPITools:masterfrom
sjw2547 wants to merge 4 commits intoOpenAPITools:masterfrom
Conversation
…rt for Vert.x 5 while keeping backward compatibility for earlier versions. Add new parameter for useVertx5.
6 tasks
Member
|
please follow step 3 to update samples and docs. |
Author
Done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
useVertx5option, 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
useVertx5(--additional-properties useVertx5=true) to generate Vert.x 5 syntax inApiClient(Future-basedsend,sendForm, file I/O, andsendBody); updated docs and addedbin/configs/java-vertx5.yamlplus a new sample atsamples/client/petstore/java/vertx5.useVertx5is false.Bug Fixes
rxApiImpl.mustache: useio.reactivex.Single/io.reactivex.rxjava3.core.Singleandio.vertx.reactivex.SingleHelper/io.vertx.rxjava3.SingleHelper; replacedSingle.createwithSingleHelper.toSinglefor RxJava2/3.ApiClientsamples.Written for commit 1a674d6. Summary will update on new commits.