1

I am following https://wildfly-swarm.gitbooks.io/wildfly-swarm-users-guide/content/v/2017.3.3/advanced/swagger.html. But it is not working.

My pom.xml

<dependency>
  <groupId>org.wildfly.swarm</groupId>
  <artifactId>swagger</artifactId>
</dependency>
<dependency>
  <groupId>org.wildfly.swarm</groupId>
  <artifactId>swagger-webapp</artifactId>
</dependency>

My ApplicationSetting .java

  package example.api;
    @ApplicationPath("/example/api")
    public class ApplicationSetting extends Application{

    }

I want to crawler all API in example.api.controller.v1 package

package example.api.controller.v1;
@ApplicationScoped
@Path("/v1")
public class AuthController {

}

My swarm.swagger.config file:

packages:example.api.controller.v1
root:api
title:WildFly Swarm Demo

But when i run http://localhost:8080/swagger-ui/index.html?url=/example/api/swagger.json. It is not working with the result of swagger.json is:

{swagger: "2.0", info: {}}
swagger: "2.0"
 info: {}

Could anyone help me with this, please!

Thank you so much.

dacoten
  • 115
  • 2
  • 12

0 Answers0