a few weeks ago I’ve tested the Swagger feature successfully. Today I tried to activate it in another liberty instance but had a lot of trouble until it worked. Although everything was installed properly and no errors have been visible in the log files the documentation for the JAX-RS annotated endpoints wasn’t generated. In the end it had nothing to do with the webapp or the feature itself but with the way I did install it. As I am behind a corporate proxy I tried to download the feature to a local repository and install it from there (to make it easier for other developers).
So at first I’ve used installUtility:
installUtility download apiDiscovery-1.0 –location=C:TemplocalRepo
Then I’ve installed the feature from the local directory via:
installUtility install apiDiscovery-1.0 –from=C:TemplocalRepo
The lafiles directory looks like the following (less directories than in the other Liberty instance):
After uninstalling the feature and installing directly from web repository with the following commands:
installUtility uninstall apiDiscovery-1.0
installUtility install apiDiscovery-1.0
Lafiles (additional directories have been created):
Now it works like in the other instance and generates documentation for REST services nicely.
As it is important for us to have a local repository (proxy & firewall reasons) it would be great if someone has an idea how to correctly downloading/ installing the feature in/from a local repo. Independently I wouldn’t expect that the installation result is somehow related to the repository location.
Any ideas are appreciated! Thanks a lot.