Skip to content

Commit 35a6b62

Browse files
committed
Fix for #LAS-198 Problem with @ApiParam
1 parent 3c9b087 commit 35a6b62

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/de/rwth/dbis/acis/bazaar/service/RequirementsResource.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import i5.las2peer.restMapper.HttpResponse;
1616
import i5.las2peer.restMapper.MediaType;
1717
import i5.las2peer.restMapper.RESTMapper;
18+
import i5.las2peer.restMapper.annotations.ContentParam;
1819
import i5.las2peer.security.UserAgent;
1920
import io.swagger.annotations.*;
2021
import jodd.vtor.Violation;
@@ -125,7 +126,7 @@ public HttpResponse getRequirement(@PathParam("requirementId") int requirementId
125126
@ApiResponse(code = HttpURLConnection.HTTP_NOT_FOUND, message = "Not found"),
126127
@ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal server problems")
127128
})
128-
public HttpResponse createRequirement(@ApiParam(value = "Requirement entity as JSON", required = true) String requirement) {
129+
public HttpResponse createRequirement(@ApiParam(value = "Requirement entity as JSON", required = true) @ContentParam String requirement) {
129130
DALFacade dalFacade = null;
130131
try {
131132
long userId = ((UserAgent) getActiveAgent()).getId();
@@ -198,7 +199,7 @@ public HttpResponse createRequirement(@ApiParam(value = "Requirement entity as J
198199
@ApiResponse(code = HttpURLConnection.HTTP_INTERNAL_ERROR, message = "Internal server problems")
199200
})
200201
public HttpResponse updateRequirement(@PathParam("requirementId") int requirementId,
201-
@ApiParam(value = "Requirement entity as JSON", required = true) String requirement) {
202+
@ApiParam(value = "Requirement entity as JSON", required = true) @ContentParam String requirement) {
202203
DALFacade dalFacade = null;
203204
try {
204205
String registratorErrors = bazaarService.notifyRegistrators(EnumSet.of(BazaarFunction.VALIDATION, BazaarFunction.USER_FIRST_LOGIN_HANDLING));

0 commit comments

Comments
 (0)