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.
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-jakartawhile 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: