I have wildfly swarm service with basic REST and I want configure swagger ui with it. At the moment it is started as jar
here is main file
Container container = new Container();
SwaggerWebAppFraction fraction = new SwaggerWebAppFraction();
//fraction.addWebContent(System.getProperty("swarm.swagger.ui.resources"));
//fraction.addWebContent("/");
// fraction.addWebContent("swagger-webapp-ui.war" + Container.VERSION);
container.fraction(fraction);
final JAXRSArchive deployment = ShrinkWrap.create(JAXRSArchive.class);
deployment.addResource(Main.class);
deployment.addResource(TimeResource.class);
deployment.addResource(CORSFilter.class);
deployment.addResource(JAXRSConfiguration.class);
// Enable the swagger bits
final SwaggerArchive archive = deployment.as(SwaggerArchive.class);
// Tell swagger where our resources are
archive.setResourcePackages("org");
//archive.setTitle("Swagger Demo");
container.start();
container.deploy(deployment);
When I access http://localhost:8080/swagger I see only this kind of output
{"swagger":"2.0","info":{},"basePath":"/","tags":[{"name":"time"}],"paths":{"/time/now":{"get":{"tags":["time"],"summary":"Get the current time","description":"Returns the time as a string","operationId":"get","produces":["application/json"],"parameters":[],"responses":{"200":{"description":"successful operation","schema":{"type":"string"}}}}}}}
just json! http://localhost:8080/swagger-ui unreachable
How to properly configure or start wildfly swarm with swagger ui? where is a mistake?