We are using SpringDoc in our WebFlux project to annotate our APIs and serve OpenAPI documentation from a UI. However, now we need the OpenAPI file generated as part of the maven build.
SpringDoc has a plugin to fetch the file from a running service, where the service has been started by spring plugin, but our service requires a lot of stuff to be set up in order to run. We are doing this setup in our tests' @BeforeClass and don't want to extract that setup (and the corresponding cleanup) just so that the service can be started as part of the maven build. Plus we plan to eventually stop starting up the service for our tests and instead use mocks, so adding a test to retrieve the file from the running test is only a temporary solution (would like to not have to maintain startup code just in order to retrieve the OpenAPI doc).
I have tried using the swagger-maven-plugin from swagger-core, but it seems to require jaxrs, which we are not using. I have also looked into SpringFox, but it also does not offer the desired functionality.
Any ideas on how to generate OpenAPI documentation for a WebFlux project as part of the maven build without starting the service?