kapua
kapua copied to clipboard
Display Custom Version and Build Number in Swagger UI
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
.