Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 1694781

Browse files
SORMAS-Foundation#3372 update Swagger API path, remove duplicate dependency
1 parent aef561e commit 1694781

2 files changed

Lines changed: 3 additions & 7 deletions

File tree

sormas-rest/src/main/java/de/symeda/sormas/rest/external/ExternalRestResourceConfig.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
import javax.ws.rs.ApplicationPath;
55
import javax.ws.rs.core.Context;
66

7-
import io.swagger.v3.jaxrs2.Reader;
8-
import io.swagger.v3.jaxrs2.integration.JaxrsOpenApiContextBuilder;
9-
import io.swagger.v3.oas.integration.OpenApiConfigurationException;
107
import org.glassfish.jersey.jackson.JacksonFeature;
118
import org.glassfish.jersey.server.ResourceConfig;
129
import org.glassfish.jersey.server.filter.RolesAllowedDynamicFeature;
@@ -25,7 +22,7 @@
2522
* Resource configuration used only for external resources i.e. for external systems which communicate with SORMAS
2623
* Separate from the other resource configuration in order to limit create the swagger documentation only for resources in this package
2724
*/
28-
@ApplicationPath("/")
25+
@ApplicationPath("/visits-external")
2926
public class ExternalRestResourceConfig extends ResourceConfig {
3027

3128
@Context
@@ -50,8 +47,7 @@ public ExternalRestResourceConfig() {
5047
.contact(new Contact().url("https://gitter.im/SORMAS-Project/dev-support"))
5148
.license(new License().name("GNU General Public License").url("https://www.gnu.org/licenses/"));
5249

53-
Reader reader = new Reader(new OpenAPI().info(info));
54-
OpenAPI openAPI = reader.read(ExternalVisitsResource.class);
50+
OpenAPI openAPI = new OpenAPI().info(info);
5551
SwaggerConfiguration openAPIConfiguration = new SwaggerConfiguration().prettyPrint(true)
5652
.openAPI(openAPI)
5753
.resourceClasses(Sets.newHashSet(ExternalVisitsResource.class.getSimpleName()));

sormas-rest/src/main/java/de/symeda/sormas/rest/external/ExternalVisitsResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import io.swagger.v3.oas.annotations.parameters.RequestBody;
2626
import io.swagger.v3.oas.annotations.responses.ApiResponse;
2727

28-
@Path("/visits-external")
28+
@Path("/")
2929
@Produces(MediaType.APPLICATION_JSON + "; charset=UTF-8")
3030
@Consumes(MediaType.APPLICATION_JSON + "; charset=UTF-8")
3131
@RolesAllowed("REST_EXTERNAL_VISITS_USER")

0 commit comments

Comments
 (0)