Details
-
Enhancement
-
Resolution: Done
-
Major
-
7.58.0.Final
-
None
-
False
-
False
-
NEW
-
NEW
-
undefined
Description
Following archetypes:
generates spring boot project with embedded kie-server.
However, the configuration (mainly pom.xml) to enable swagger spec and Swagger UI has to be added manually.
This configuration is very sensitive to any version changes and upgrades. So the config which used to work for one jBPM (RHPAM) version, might not work for the next one.
It would greatly simplify getting started phase (but also upgrades) if the archetype in question would be capable of generating config needed to enable swagger, so developers don't need to figure it out for themselves.
One specific example:
Following BOM [1] mentions these versions:
<version.org.apache.cxf>3.2.14</version.org.apache.cxf>
<version.io.swagger>1.5.20</version.io.swagger>
<version.org.webjars>2.2.10</version.org.webjars>
However, with the versions above, the Swagger UI rendering does not work. One needs to download io.swagger from 1.5.20 to 1.5.15 to enable Swagger UI in RHPAM 7.11.1.
Next example is the jackson libraries. With the default configuration, looking similar to this:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-service-description-swagger</artifactId>
<version>${version.org.apache.cxf}</version>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jaxrs</artifactId>
<version>${version.io.swagger}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.webjars/swagger-ui -->
<dependency>
<groupId>org.webjars</groupId>
<artifactId>swagger-ui</artifactId>
<version>${version.org.webjars}</version>
</dependency>
One will hit following issue: https://github.com/swagger-api/swagger-core/issues/3554
The solution is to exclude the jackson libraries in question and align them to versions outlined in the BOM [1].
To avoid all these challenges, archetype could be enhanced to support swagger config.
[1] https://github.com/kiegroup/droolsjbpm-build-bootstrap/blob/7.52.x/pom.xml#L335