Add swagger version to BOM #3222
Replies: 3 comments 4 replies
-
|
My understanding is that if a BOM adds a version then that could affect what "transitive dependency that wins". Thus it is a potential breaking change and hence dangerous. Any user that does not explicitly specify a version already might have their version changed. This would "force users to specify their version", to ensure that springdoc-openapi does not change it. |
Beta Was this translation helpful? Give feedback.
-
|
My suggestion comes after just such a case, where we had version of swagger defined ourselves (to avoid pulling in springdoc-openapi-starter-webmvc-api just to ensure we get the version of swagger used by springdoc). I believe defining a version in a bom is the way to allow this to not happen. If users need a version of swagger that differs from the one defined in your bom, and if that version is incompatible with springdoc, then I believe they have other problems. The article from https://reflectoring.io/maven-bom/ has a good quote:
A good example is Jackson's BOM: Or the big one. Spring Boot Dependencies: |
Beta Was this translation helpful? Give feedback.
-
|
Hi @HenrikPublic, As mentioned in my previous comment, if you’ve found a more efficient workaround, please feel free to submit a PR directly! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This one got locked for comments, so i'll continue here:
#3212
@bnasslahsen I am confused about why adding the swagger dependencies to the BOM would force users to specify the version?
The whole point was to NOT have to do that.
The BOM should contain the dependency with the version.
Beta Was this translation helpful? Give feedback.
All reactions