Details
-
Bug
-
Resolution: Unresolved
-
Neutral
-
None
-
1.7
-
None
-
None
Description
If you have a rest method, which does not take any parameters other than the body, the client app will fail to execute the request:
@POST @Path("/v1/recommendations") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) JsonNode recommendations(String body);
{{The parseParameters() method will either not parse any parameters (if you don't enter "body=" in the "Method parameters" field) or will give return "}}Wrong number of arguments" error (when you do add the "body=" parameter). The only way to get this to work Is to add a dummy parameter like so:
@POST @Path("/v1/recommendations") @Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.APPLICATION_JSON) JsonNode recommendations(String body, @HeaderParam("Foo") String foo);
and then fill in the Method parameters as such:
"Foo"="Bar"
Checklists
Acceptance criteria