OpenAPITools / OpenAPITools/openapi-generator

[REQ] Update Java Vert.x Web to use Vert.x 4.2 Constructs

Open
#11,446 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

Since this generator was created, the underlying Vert.x mechanisms for Web API Implementation have changed drastically. The old
OpenAPIv3Router has been replaced with the new OpenAPI RouterBuilder. The older ServiceProxy implementation has been updated to use WebApiServiceGen interfaces. It would be helpful if this generator could be expanded to support the newer Vert.x 4.2 semantics.

Describe the solution you'd like

  1. The generator should retain backward compatibility for current users
  2. The new features should aim to support different reactivity constructs (RxJava2/3, Mutiny, Future, CompletionStage)
  3. The generated service interfaces should return a "Not Implemented" response as part of a default method body
  4. Generate stubs for the service implementations using the chosen reactivity constructs
  5. A generated MainVerticle should use the selected reactivity constructs to initialize, bind, and mount the web API services.

Longer term additional goals:

  • Mock implementation
  • Authorizations

Describe alternatives you've considered

  • I have considered creating a new generator altogether, but that seems to be a confusion solution and there are already multiple Vert.x generators
  • Locally, I have created my own override templates which meet my needs, but they are not easily re-usable for others
  • I have considered contributing just updated templates, but that will not handle all of the reactivity constructs

Additional context

An example of my customized templates can be seen in the modules/api module of this maven project

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the current Java Vert.x Web generator and the customized templates in the linked Maven project's modules/api module. Clarify the backward-compatibility and reactivity requirements before locating the affected generator templates; done would include the requested Vert.x 4.2 constructs, service stubs, default responses, and MainVerticle generation.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.