Swagger/java should be developer dependency
We previously discussed whether requiring Java for every build (to run goswagger) is a problem or not. We now have several good arguments for it being a real problem:
- swagger fails on docker on Ubuntu 20.04 (see #304 (closed)) The proposed workaround (to upgrade to newer kernel) is unacceptable (newer packages are not available for 20.04 which is the latest Ubuntu release, nobody will compile kernel just to build Stork)
- some users dislike Java: https://github.com/isc-projects/kea-anterius/issues/33#issuecomment-594473167
- installing Java and swagger for every build slows down the build process
- making swagger to run on FreeBSD is complicated (see #193 (closed))
The Stork build has to be updated, so it should be possible to build it without having Java installed.
One possible way to achieve that is to commit the generated API files and require java/run goswagger only when the API is being changed. So it would become a development dependency. This is how we treat bison in Kea. It's only required for developers when parser change is being done. Similarly, here swagger would only be needed when API change was introduced.
Edited by Tomek Mrugalski