Trying to add Swagger to service

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@133391 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-10-21 15:42:22 +00:00
parent ce316f58aa
commit 7dc674915f
2 changed files with 35 additions and 9 deletions

View File

@ -1,9 +1,31 @@
<web-app>
<servlet>
<servlet-name>org.gcube.informationsystem.resourceregistry.ResourceInitializer</servlet-name>
</servlet>
<servlet-mapping>
<servlet-name>org.gcube.informationsystem.resourceregistry.ResourceInitializer</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
<servlet-name>org.gcube.informationsystem.resourceregistry.ResourceInitializer</servlet-name>
<init-param>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>
io.swagger.jaxrs.listing,
org.gcube.informationsystem.resourceregistry.resources
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>Jersey2Config</servlet-name>
<servlet-class>io.swagger.jersey.config.JerseyJaxrsConfig</servlet-class>
<init-param>
<param-name>api.version</param-name>
<param-value>1.0.0</param-value>
</init-param>
<init-param>
<param-name>org.gcube.informationsystem.resourceregistry</param-name>
<param-value>http://localhost:8080/api</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>org.gcube.informationsystem.resourceregistry.ResourceInitializer</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>

View File

@ -123,7 +123,11 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-jersey2-jaxrs</artifactId>
<version>1.5.0</version>
</dependency>
<!-- Test Dependency -->
<dependency>
@ -200,4 +204,4 @@
</plugin>
</plugins>
</build>
</project>
</project>