swagger-core icon indicating copy to clipboard operation
swagger-core copied to clipboard

[Feature]: Provide a BOM module for managing dependencies (#4966)

Open kuntal1461 opened this issue 2 months ago • 4 comments


Pull Request

Thank you for contributing to swagger-core!


Description

Adds a Maven BOM module to centralize and align versions of Swagger Core artifacts. Helps avoid version drift and resolve dependency conflicts in multi-module and complex projects. Also documents BOM usage with an import snippet and example dependencies.

Fixes: #4966


Changes

  • 🆕 New BOM module with managed Swagger artifacts: modules/swagger-bom/pom.xml
  • 🔗 Wire BOM into the multi-module build: pom.xml:404
  • 📘 Add “Maven BOM” section with usage example: README.md:150

Usage

Import the BOM in your project’s dependencyManagement section and omit versions on Swagger dependencies:

<dependencyManagement>
  <dependencies>
    <dependency>
      <groupId>io.swagger.core.v3</groupId>
      <artifactId>swagger-bom</artifactId>
      <version>${swagger-core.version}</version>
      <type>pom</type>
      <scope>import</scope>
    </dependency>
  </dependencies>
</dependencyManagement>

See README.md:150 for the complete snippet and examples.


Compatibility

✅ Non-breaking — no code or API changes. 🔧 Pure build/dependency-management improvement.


Notes

The BOM currently manages the javax-based artifacts:

swagger-annotations, swagger-models, swagger-core, swagger-integration, swagger-jaxrs2, swagger-jaxrs2-servlet-initializer, swagger-jaxrs2-servlet-initializer-v2, swagger-java17-support

Follow-up: if useful, a parallel Jakarta BOM (e.g., swagger-bom-jakarta) can be added.


Type of Change

  • [x] ✨ New feature
  • [x] 📝 Documentation
  • [x] 🧹 Chore (build or tooling)

Checklist

  • [x] Documentation updated (README BOM usage)
  • [x] Tests added/updated (not applicable)
  • [x] Descriptive PR title
  • [x] Build and tests pass locally
  • [x] Related issue linked (#4966)

Ready for review — introduces swagger-bom for consistent dependency alignment across Swagger Core modules.

kuntal1461 avatar Oct 07 '25 18:10 kuntal1461

@kuntal1461 we really appreciate your work and commitment! Please check your PR and remove unnecessary changes. Leave only the part concerning BOM module.

daniel-kmiecik avatar Oct 09 '25 12:10 daniel-kmiecik

Hi @daniel-kmiecik Please check once . and please let know anything I need to updated

kuntal1461 avatar Oct 10 '25 11:10 kuntal1461

Hi @daniel-kmiecik Please check once and let me know if there’s anything I need to update. I haven’t received any review comments yet, so just wanted to confirm if any changes are pending from my side.

kuntal1461 avatar Oct 11 '25 18:10 kuntal1461

align all versions, include swagger-annotations-jakarta.

see: https://search.maven.org/search?q=io.swagger.core.v3

mymx2 avatar Oct 28 '25 06:10 mymx2