java - swagger jersey 2.5 Rest API integration not working -


i followed step add swagger built jersey rest api project in tomcat follow steps https://github.com/swagger-api/swagger-core/wiki/swagger-core-jersey-2.x-project-setup-1.5#configure-and-initialize-swagger

step 1: added following

swagger-annotations_2.10-1.3.0  swagger-core_2.10-1.3.10  swagger-jaxrs_2.10-1.3.10  swagger-jersey2-jaxrs_2.10-1.3.10 

step 2: added swagger core provider in application sub class

resources.add(com.wordnik.swagger.jersey.listing.apilistingresource.class);  resources.add(com.wordnik.swagger.jersey.listing.jerseyapideclarationprovider.class); resources.add(com.wordnik.swagger.jersey.listing.apilistingresourcejson.class); resources.add(com.wordnik.swagger.jersey.listing.jerseyresourcelistingprovider.class); 

step 3. used application class constructor setup swagger:

 public applicationconfig() {         beanconfig beanconfig = new beanconfig();         beanconfig.setversion("1.0.0");         beanconfig.setbasepath("localhost:8080/api");         beanconfig.setresourcepackage(resource_package);         beanconfig.setscan(true);     } 

however, when navigate to:

http://localhost:8080/test/api/partner/v1/swagger.json

i see:

http status 404 - page not found.

i see couple things. first, guide, dependencies should be:

<dependency>   <groupid>io.swagger</groupid>   <artifactid>swagger-jersey2-jaxrs</artifactid>   <version>1.5.0</version> </dependency> 

your post looks not 1.5.0 (actually can use 1.5.3 of last week).


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

python - build a suggestions list using fuzzywuzzy -