diff options
author | Shwetank Dave <shwetank.dave@amdocs.com> | 2018-04-16 10:52:41 -0400 |
---|---|---|
committer | Shwetank Dave <shwetank.dave@amdocs.com> | 2018-04-16 10:54:31 -0400 |
commit | b017fc5719f90d37b3c4d45698f018f83fa8e910 (patch) | |
tree | a3daa480217a06210d32ff6a7f47187e2e8ae9dd | |
parent | 8c42dfa6e88387e908034a83cb3e8270b53788b5 (diff) |
Add cosumes and produces type where necessary
Change-Id: I4e4a458a65dc870218de33e19ca76f060b436739
Issue-ID: AAI-598
Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
-rw-r--r-- | src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java | 9 | ||||
-rw-r--r-- | src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java | 10 |
2 files changed, 8 insertions, 11 deletions
diff --git a/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java b/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java index 7e187ee..98b164b 100644 --- a/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java +++ b/src/main/java/org/onap/aai/sa/rest/SearchServiceApi.java @@ -128,8 +128,7 @@ public class SearchServiceApi { } @RequestMapping(value = "/indexes/{index}/documents/{id}", - method = RequestMethod.GET, - consumes = {"application/json"}) + method = RequestMethod.GET) public ResponseEntity<String> processGetDocument(HttpServletRequest request, HttpServletResponse httpResponse, @RequestHeader HttpHeaders headers, @@ -158,8 +157,7 @@ public class SearchServiceApi { } @RequestMapping(value = "/indexes/{index}/query/{queryText}", - method = RequestMethod.GET, - consumes = {"application/json"}) + method = RequestMethod.GET) public ResponseEntity<String> processInlineQuery(HttpServletRequest request, @RequestHeader HttpHeaders headers, @PathVariable ("index") String index, @@ -224,7 +222,8 @@ public class SearchServiceApi { @RequestMapping(value = "/bulk", method = RequestMethod.POST, - consumes = {"application/json"}) + consumes = {"application/json"}, + produces = { "application/json"}) public ResponseEntity<String> processBulkRequest(@RequestBody String requestBody, HttpServletRequest request, @RequestHeader HttpHeaders headers) { diff --git a/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java b/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java index f7a281a..854c061 100644 --- a/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java +++ b/src/test/java/org/onap/aai/sa/rest/SearchServiceApiHarness.java @@ -87,9 +87,7 @@ public class SearchServiceApiHarness extends SearchServiceApi { @Override @RequestMapping (value="/indexes/{index}/documents/{id}", - method = RequestMethod.GET, - produces = { "application/json"}, - consumes = { "application/json", "application/xml" }) + method = RequestMethod.GET) public ResponseEntity<String> processGetDocument( HttpServletRequest request, HttpServletResponse httpResponse, @@ -142,8 +140,7 @@ public class SearchServiceApiHarness extends SearchServiceApi { @Override @RequestMapping(value = "/indexes/{index}/query/{queryText}", - method = RequestMethod.GET, - consumes = { "application/json"}) + method = RequestMethod.GET) public ResponseEntity<String> processInlineQuery(HttpServletRequest request, @RequestHeader HttpHeaders headers, @PathVariable("index") String index, @@ -179,7 +176,8 @@ public class SearchServiceApiHarness extends SearchServiceApi { @Override @RequestMapping(value = "/bulk", method = RequestMethod.POST, - consumes = { "application/json", "application/xml" }) + consumes = { "application/json"}, + produces = { "application/json"}) public ResponseEntity<String> processBulkRequest(@RequestBody String requestBody, HttpServletRequest request, @RequestHeader HttpHeaders headers) { |