OpenAPITools / OpenAPITools/openapi-generator
[REQ][jaxrs][server] Are 8 variants of the jaxrs generator really necessary?
Nobody has claimed this yet.
- 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.
Having worked on the jaxrs-spec generator for a bit in a fork and now trying to get some changes to it into the official repository, I am wondering if it is really in the best interest of the OpenAPI Generator project to support and maintain 8 different variants of jaxrs server generators with lots of code and template duplication.
Currently bug fixes and new features seem to be developed separately by the respective maintainers of the different variants, multiplying the net effort needed to maintain all the code. Also, some variants seem less well maintained, resulting in bugs not getting fixed for years (observed with the jaxrs-spec generator).
Describe the solution you'd like
Reducing the number of generators by merging them and exposing the differences via options seems desirable to me. One step in this direction is PR #6130, which I am eagerly awaiting to be merged.
Perhaps it also makes sense to additionally differentiate between the generated API classes and the model classes. The model classes depend on the used serialization libraries, whereas the API classes depend on the used JAXRS implementation. Nevertheless the generators are being distinguished by JAXRS implementation only, duplicating their model implementations, if I have seen correctly.
A third differentiator might be some kind of "server environment", distinguishing between Java Enterprise application server, Spring, Quarkus and the like.
Having had a short look at the output of the CXF and Spec variants, their differences seem mostly superficial, differing mostly in the generated Annotations and Comments (and of course differing a lot in the generated white space and formatting). Without having looked at the other generators, I hope the proposed task of unifying the generators is not impossible. ;-)
I would volunteer for working on this if the maintainers of Openapi Generator consider this a desirable goal and supporting the effort.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the eight JAX-RS server generator variants and PR #6130, then compare their generated API and model differences. The issue does not name specific files or tests. Done would require maintainer agreement on the consolidation approach and implementation of the resulting generator options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend-api-design, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100