kapua icon indicating copy to clipboard operation
kapua copied to clipboard

Display Custom Version and Build Number in Swagger UI

Open MDeLuise opened this issue 1 year ago • 1 comments

Description

This pull request resolves an issue where the version number displayed in the Swagger UI was always retrieved from the pom.xml file, regardless of any custom version and build number specified during the project build process.

Prior to this PR, users were unable to customize the version and build number displayed in the Swagger UI, as it solely relied on the information stored in the pom.xml file. However, with this enhancement, users can now specify custom version and build number values during project builds using the -Dcommons.version=custom-version -Dcommons.build.number=custom-build-number flags. These custom values are then accurately reflected not only in the container environment but also in the Swagger UI.

Usage

If the project is build using mvn clean install then the version displayed in the Swagger UI will be the one defined in the project.version followed by the build number placeholder unknown. If the project is build using mvn clean install -Dcommons.version=foo -Dcommons.build.number=bar then the version displayed in the Swagger UI will be foo-bar.

MDeLuise avatar Mar 22 '24 13:03 MDeLuise

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 16.87%. Comparing base (81a090d) to head (d2fe5f3).

:exclamation: Current head d2fe5f3 differs from pull request most recent head aa5608a. Consider uploading reports for the commit aa5608a to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #4001   +/-   ##
==========================================
  Coverage      16.87%   16.87%           
  Complexity        10       10           
==========================================
  Files           1989     1989           
  Lines          51791    51791           
  Branches        4420     4420           
==========================================
  Hits            8739     8739           
  Misses         42648    42648           
  Partials         404      404           

codecov[bot] avatar Mar 25 '24 12:03 codecov[bot]