eclipse-ee4j / jersey

Eclipse Jersey Project - Read our Wiki:
https://github.com/eclipse-ee4j/jersey/wiki
Other
692 stars 353 forks source link

JerseyTest - Grizzly does not process BODY with DELTE commands. #3715

Open jerseyrobot opened 6 years ago

jerseyrobot commented 6 years ago

I created a simple DELTE action with a Rest interface:

@DELETE @Path("/systemuser/{organisation}/") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) @ApiOperation(value = "Deletes the given system user from the organisation indicated by shortname.") @ApiResponses(value = {@ApiResponse(code = 204, message = "System User is deleted"), @ApiResponse(code = 400, message = "No valid system user data provided"), @ApiResponse(code = 401, message = "Not authenticated")}) public Response deleteSystemUser(@PathParam("organisationShortName") String organisation, @javax.validation.constraints.NotNull List<Users> users) { return LogInfo.logDuration(log, "deleteSystemUser", () -> { log.info("Deleted users {}", users); return handleExceptions(() -> { accountsService.deleteSystemUser(organisationShortName, users); return Response.status(204) // .build(); }); }); }

And I try to test this with a simple JersyTest to see if all is well. But it seems that the Grizzly container is a bit strict on this implemenation and ignores the HTTP body. And seeing I dont want the list of ussers in query parameters I now have to put a test on ignore.

jerseyrobot commented 6 years ago