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

Commit 4fac03c

Browse files
Merge pull request SORMAS-Foundation#3758 from hzi-braunschweig/3754-fix-swagger.json
SORMAS-Foundation#3754 fix ExternalVisitsResource not being added to generated swagger doc
2 parents 38440ee + 8ef3cd2 commit 4fac03c

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ SORMAS officially supports and is tested on **Chromium-based browsers** (like Go
2828
#### Is there a ReST API documentation?
2929
Yes! Please download the [latest release](https://github.com/hzi-braunschweig/SORMAS-Project/releases/latest) and copy the content of /deploy/openapi/sormas-rest.yaml to an editor that generates a visual API documentation (e.g. https://editor.swagger.io/).
3030
<br/>
31-
Runtime Swagger documentation of the External Visits Resource (used by external symptom journals such as CLIMEDO or PIA) is also available at ``<<host>>/sormas-rest/visits-external/openapi.json`` or ``<<host>>/sormas-rest/visits-external/openapi.yaml``
31+
Runtime Swagger documentation of the External Visits Resource (used by external symptom journals such as CLIMEDO or PIA) is also available at ``<<host>>/sormas-rest/openapi.json`` or ``<<host>>/sormas-rest/openapi.yaml``
3232

3333
<p align="center"><img src="https://user-images.githubusercontent.com/23701005/74659600-ebb8fc00-5194-11ea-836b-a7ca9d682301.png"/></p>
3434

sormas-rest/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
<!-- Swagger Generation Config -->
123123
<resourcePackages>
124124
<resourcePackage>de.symeda.sormas.rest</resourcePackage>
125+
<resourcePackage>de.symeda.sormas.rest.external</resourcePackage>
125126
<resourcePackage>de.symeda.sormas.rest.swagger</resourcePackage>
126127
</resourcePackages>
127128
<outputDirectory>${basedir}/target/</outputDirectory>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
* Resource configuration used only for external resources i.e. for external systems which communicate with SORMAS
2222
* Separate from the other resource configuration in order to limit create the swagger documentation only for resources in this package
2323
*/
24-
@ApplicationPath("/visits-external")
24+
@ApplicationPath("/")
2525
public class ExternalRestResourceConfig extends ResourceConfig {
2626

2727
@Context

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("/")
28+
@Path("/visits-external")
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)