Make Swagger annotation dependencies optional
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 78/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- java
- Domain
- build-system
Research direction
Review the Maven dependency declarations for io.swagger:swagger-annotations and io.swagger.core.v3:swagger-annotations. Mark both dependencies optional, then run the full Adyen test suite and verify that the payment/webhook and terminal modules compile for a Kotlin consumer with both annotation dependencies excluded.
Written by the indexing model from the issue text.
Description
The SDK declares both Swagger v1 (io.swagger:swagger-annotations) and Swagger v3 (io.swagger.core.v3:swagger-annotations) as mandatory transitive dependencies. They annotate generated model metadata but are not required for API calls, serialization, webhook verification, or other SDK runtime behavior.
This causes avoidable conflicts for consumers that use a different Swagger namespace. A Spring Boot 4 application using springdoc Jakarta receives swagger-annotations-jakarta while Adyen adds the non-Jakarta v3 artifact containing the same annotation class names. In our packaged application this produced 62 duplicate-class collisions until both Adyen annotation artifacts were explicitly excluded.
The SDK compiles against the annotations, so marking them Maven-optional preserves SDK compilation and makes them available to consumers that explicitly want to reflect on Adyen model documentation. Ordinary consumers no longer receive two documentation-only artifacts.
Proposed change: add <optional>true</optional> to both Swagger annotation dependencies.
Verification performed:
- Full Adyen test suite on JDK 26: 617 tests, 0 failures/errors, 4 skips.
- Consumer Kotlin compilation with both dependencies excluded: Adyen payment/webhook and terminal modules compile successfully.
- Dominant language
- Java
- Stars
- 148
- Forks
- 158
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 10
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.
More from Adyen/adyen-java-api-library
-
do not stale
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Adyen/adyen-java-api-library#2053 ·
-
Bug report do not stale
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Adyen/adyen-java-api-library#1953 · 2 comments ·
-
Bug report do not stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Adyen/adyen-java-api-library#1878 · 2 comments ·
-
do not stale Feature
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Adyen/adyen-java-api-library#1910 · 2 comments ·
-
do not stale Feature
Difficulty 4/5 3-5 days Newbie friendliness 45/100
Adyen/adyen-java-api-library#1899 · 8 comments · 2 reactions ·
All issues in Adyen/adyen-java-api-library
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100