I have followed this tutorial Swagger UI on MicroProfile OpenAPI but simply adding the below to a pom.xml file of a Payara micro application does not add /openapi-ui
, only /openapi
works. Is there something else that is required or is it not possible with Payara Micro to have OpenApi UI.
<dependency>
<groupId>org.microprofile-ext.openapi-ext</groupId>
<artifactId>openapi-ui</artifactId>
<version>1.1.2</version>
</dependency>
My problem was the Application config class. I had to change
from:
@ApplicationPath("/api/v1")
public class JAXRSConfiguration extends Application {
public Set<Class<?>> getClasses() {
Set<Class<?>> s = new HashSet<>();
s.add(MyResource.class);
return s;
}
}
to
@ApplicationPath("/api")
public class JAXRSConfiguration extends Application {
}
Somehow overriding the getClasses()
method and adding /v1
to the application path was messing with the openApi-ui configurations.