diff options
author | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-11-06 15:49:13 +0100 |
---|---|---|
committer | Fiete Ostkamp <Fiete.Ostkamp@telekom.de> | 2024-11-19 08:32:06 +0100 |
commit | 6ecf6370d5bc38b6313f869d321dd2294563d4b0 (patch) | |
tree | 35879c3b697ec9fe4a1f85c3eede2e979cfdab9c /aai-resources/src/main | |
parent | fd112727637454135c8ec80a8455ed0b6db3e948 (diff) |
Use WebTestClient in tests - part 31.15.2
- make ResourcesControllerTest full integration test
- this later on allows declaring all supported api query params explicitly,
that are implicitly supported currently
- add new ResourcesControllerMockTest that asserts exception handling for internal server errors
- remove body arg from @GET annotated controller methods
Issue-ID: AAI-4039
Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Change-Id: I4f2f31bbea4e5f0f19cb98ebc040472616e9eee0
Diffstat (limited to 'aai-resources/src/main')
-rw-r--r-- | aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java | 5 | ||||
-rw-r--r-- | aai-resources/src/main/java/org/onap/aai/rest/VertexIdConsumer.java | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java index bf29fd01..d64e8622 100644 --- a/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java +++ b/aai-resources/src/main/java/org/onap/aai/rest/URLFromVertexIdConsumer.java @@ -47,8 +47,8 @@ import org.onap.aai.setup.SchemaVersion; /** * The Class URLFromVertexIdConsumer. */ -@Path("{version: v[1-9][0-9]*|latest}/generateurl") @Timed +@Path("{version: v[1-9][0-9]*|latest}/generateurl") public class URLFromVertexIdConsumer extends RESTAPI { private ModelType introspectorFactoryType = ModelType.MOXY; @@ -57,7 +57,6 @@ public class URLFromVertexIdConsumer extends RESTAPI { /** * Generate url from vertex id. * - * @param content the content * @param versionParam the version param * @param vertexid the vertexid * @param headers the headers @@ -68,7 +67,7 @@ public class URLFromVertexIdConsumer extends RESTAPI { @GET @Path(ID_ENDPOINT) @Produces({MediaType.WILDCARD}) - public Response generateUrlFromVertexId(String content, @PathParam("version") String versionParam, + public Response generateUrlFromVertexId(@PathParam("version") String versionParam, @PathParam("vertexid") long vertexid, @Context HttpHeaders headers, @Context UriInfo info, @Context HttpServletRequest req) { diff --git a/aai-resources/src/main/java/org/onap/aai/rest/VertexIdConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/VertexIdConsumer.java index a7b353ee..f0a3c3eb 100644 --- a/aai-resources/src/main/java/org/onap/aai/rest/VertexIdConsumer.java +++ b/aai-resources/src/main/java/org/onap/aai/rest/VertexIdConsumer.java @@ -64,7 +64,6 @@ public class VertexIdConsumer extends RESTAPI { /** * Gets the by vertex id. * - * @param content the content * @param versionParam the version param * @param vertexid the vertexid * @param depthParam the depth param @@ -76,7 +75,7 @@ public class VertexIdConsumer extends RESTAPI { @GET @Path(ID_ENDPOINT) @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML}) - public Response getByVertexId(String content, @PathParam("version") String versionParam, + public Response getByVertexId(@PathParam("version") String versionParam, @PathParam("vertexid") long vertexid, @DefaultValue("all") @QueryParam("depth") String depthParam, @Context HttpHeaders headers, @Context UriInfo info, @Context HttpServletRequest req) { |