Skip to content

Commit

Permalink
Merge pull request #390 from fehguy/issue-389
Browse files Browse the repository at this point in the history
handle unboxing on boolean check
  • Loading branch information
gracekarina authored Jun 4, 2021
2 parents 35b8d38 + f81d791 commit a8b051f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public Response apply(ContainerRequestContext ctx) {
missingParams.add(e.getError());
}

} else if (operation.getRequestBody().getRequired()) {
} else if (Boolean.TRUE.equals(operation.getRequestBody().getRequired())) {
ValidationException e = new ValidationException();
e.message(new ValidationMessage()
.message("The input body `" + operation.getRequestBody() + "` is required"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ public void verifyUpdatePet() throws Exception {
assertEquals("chocolate", cookie.getValue());
}

@Test
public void verifyUpdatePet() throws Exception {
String path = "/pets";
String str = client.invokeAPI(path, "POST", new HashMap<String, String>(), null, new HashMap<String, String>(), null, "application/json", null, new String[0]);
assertEquals(str, "OK!");
}

@Test
public void verifyValidDateTimeInput() throws Exception {
String path = "/withDate/" + new DateTime().toString();
Expand Down

0 comments on commit a8b051f

Please sign in to comment.