OpenAPITools / OpenAPITools/openapi-generator

[REQ] [Java] Swagger dependency old

Open
#5,478 3 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.

Through this issue I'm forced to use different Swagger versions in my project, which leads to more dependencies and more knowledge, that developers at my company have to acquire about the different Swagger versions.

Describe the solution you'd like

In my pom.xml I want to have this:

        <dependency>
            <groupId>io.swagger</groupId>
            <artifactId>swagger-annotations</artifactId>
            <version>2.1.1</version>
        </dependency>

Describe alternatives you've considered

I considered manually changing my templates, but that doesn't seem to work, because the old imports are written using the {{#imports}}...{{/imports}} variable.

If the pain of using two different Swagger versions in parallel in my project becomes too high, I will reluctantly consider turning off the automatic code generation and "manually" update.

Additional context

There is already #4245, #5388 and #4779 for the spring generator and #27 for the jaxrs-* generators.

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 with the Java generator templates and the pom.xml dependency configuration, then inspect how the {{#imports}}...{{/imports}} variable produces Swagger imports. Compare the related spring and jaxrs-* issues before deciding the affected generator scope. Done means generated projects use swagger-annotations 2.1.1 consistently without requiring parallel Swagger versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.