My Java web application is based on Spring boot 2 framework with Resteasy. I don't use web.xml or Spring's xml, but only annotations. I have multiple applications (@ApplicationPath) under the root context e.g. "/apis/api/authn" and "/apis/api/authz". Each application has multiple resources configured.
Observed When I retrieve the openapi document (e.g. /api-docs/openapi.json), only the lastly registered Resteasy application's API is available as openapi.json. I can see Resteasy doing its scan and can verify that the last application is the one that is used for generating the documentation.
Expected With default configuration, I was expecting to see all of the resources of all applications in one openapi document or, if possible, they could be separated by Swagger context or even the possibility to have a Swagger app per Resteasy app would be enough
Some previous issues that I have found, but the solutions don't work for me.
My Java web application is based on Spring boot 2 framework with Resteasy. I don't use web.xml or Spring's xml, but only annotations. I have multiple applications (@ApplicationPath) under the root context e.g. "/apis/api/authn" and "/apis/api/authz". Each application has multiple resources configured.
Observed When I retrieve the openapi document (e.g. /api-docs/openapi.json), only the lastly registered Resteasy application's API is available as openapi.json. I can see Resteasy doing its scan and can verify that the last application is the one that is used for generating the documentation.
Expected With default configuration, I was expecting to see all of the resources of all applications in one openapi document or, if possible, they could be separated by Swagger context or even the possibility to have a Swagger app per Resteasy app would be enough
Some previous issues that I have found, but the solutions don't work for me.
And possibly https://github.com/swagger-api/swagger-core/issues/3011
Noticed that scanner runs only once, and that I think the problem lies in https://github.com/swagger-api/swagger-core/blob/7f89e8fade0e867f5b25478c515a8f38a79d9563/modules/swagger-jaxrs2/src/main/java/io/swagger/v3/jaxrs2/integration/resources/BaseOpenApiResource.java
Digging more on Resteasy side (ResteasyEmbeddedServletInitializer): https://github.com/resteasy/resteasy-spring-boot/blob/master/resteasy-spring-boot-starter/src/main/java/org/jboss/resteasy/springboot/ResteasyEmbeddedServletInitializer.java