Swagger UI not working in Flowable REST API 6.0.0

I’m trying to use the Swagger UI packaged in the Flowable 6.0.0 Rest API war file but it doesn’t seem to be working.
I have downloaded Flowable 6.0.0 from flowable.org and deployed the REST API war file in tomcat. The deployment in Tomcat seems to be working ok.
When I navigate to http://localhost:8080/flowable-rest/docs I am presented with the Swagger UI banner and an error message ‘Can’t read swagger JSON from http://localhost:8080/flowable-rest/docs/specfile/process/flowable.json’.

I afterwards tried the previous 6.0.0.RC1 release and this worked when I navigated to the same URL.

I looked around in the WAR file and have not found any specification files, but when I looked in 6.0.0.RC1 and found them in the docs/specfile directory.

Is there a problem in the 6.0.0 WAR packing or is there something I am doing wrong? I haven’t used Swagger before so I’m not really sure how it works.

Thanks for any help.

Hi,

I looked into it. You’re correct. The Swagger spec files aren’t included in the downloadable Flowable 6.0 final REST API war.
This will be fixed in the next release.

In the meantime there are a few options to get the Swagger UI up and running.
You can use the Flowable REST docker image;

docker run -p8080:8080 flowable/flowable-rest

Or you can start by building from source by running the script;

<flowable_root>/scripts/start-rest.sh

Or just build the WAR file with included Swagger spec files;

<flowable_root>/modules/flowable-app-rest
mvn clean package -Pswagger -Dswagger.host=localhost:8080 -Dfile.encoding=UTF-8

Regards,

Yvo

Thank you for the help.

I rebuilt the WAR using Maven, redeployed to Tomcat and Swagger-UI is now working.

Hi, Just to note, this doesn’t appear to be in 6.0.1 either.

Hi,

the change to the build script slipped through.
The REST app WAR in the distro.zip on Github contains the Swagger docs now. (link: release 6.0.1 )

Thanks for pointing it out.

Regards Yvo

1 Like