Skip to content
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.

Commit

Permalink
Ability to mark service parameter as optional for easy API evolving #28
Browse files Browse the repository at this point in the history
  • Loading branch information
Desire456 committed Aug 18, 2021
1 parent f0cfee8 commit ecbf3e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sample-rest/src/test/java/services/ServicesControllerFT.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public void serviceWithOptionalParamsGET() throws Exception {
params.put("arg1", "1");
try (CloseableHttpResponse response = sendGet(baseUrl + "/services/" + RestTestService.NAME + "/overloadedMethodWithOptionalArgs", oauthToken, params)) {
assertEquals(HttpStatus.SC_BAD_REQUEST, statusCode(response));
assertTrue(responseToString(response).contains("Can not determine the service method"));
assertTrue(responseToString(response).contains("Cannot determine the service method to call"));
}
}

Expand Down Expand Up @@ -721,7 +721,7 @@ public void getServiceInfo() throws Exception {
assertEquals(HttpStatus.SC_OK, statusCode(response));
ReadContext readContext = parseResponse(response);
assertEquals("jmix_RestTestService", readContext.read("$.name"));
assertEquals(29, readContext.<Collection>read("$.methods").size());
assertEquals(32, readContext.<Collection>read("$.methods").size());
assertEquals(2, readContext.read("$.methods[?(@.name == 'sum')].params.length()", List.class).get(0));

assertEquals("number1", readContext.read("$.methods[?(@.name == 'sum')].params[0].name", List.class).get(0));
Expand Down

0 comments on commit ecbf3e9

Please sign in to comment.