diff options
author | Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com> | 2019-01-29 15:55:37 -0500 |
---|---|---|
committer | Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com> | 2019-01-29 16:05:01 -0500 |
commit | a27be9fdbbf2d271c9c5780ba70fe15a24dbdb63 (patch) | |
tree | 1fa631eae149ed6be33b636e7eac03dadbef64c3 /src/main/java/org/onap/music/rest/RestMusicTestAPI.java | |
parent | 95489883ce973e84267fcbcee685f1598d4bdd6e (diff) |
Push variuos changes
- Spring Boot
- Cadi
- Cassandra Locking
Change-Id: Ie9882f81f0ca141bdb7862cdabf978481fcd7c4a
Issue-ID: MUSIC-296,MUSIC-272
Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
Diffstat (limited to 'src/main/java/org/onap/music/rest/RestMusicTestAPI.java')
-rw-r--r-- | src/main/java/org/onap/music/rest/RestMusicTestAPI.java | 43 |
1 files changed, 22 insertions, 21 deletions
diff --git a/src/main/java/org/onap/music/rest/RestMusicTestAPI.java b/src/main/java/org/onap/music/rest/RestMusicTestAPI.java index 287fa176..6d973acb 100644 --- a/src/main/java/org/onap/music/rest/RestMusicTestAPI.java +++ b/src/main/java/org/onap/music/rest/RestMusicTestAPI.java @@ -19,6 +19,7 @@ * ============LICENSE_END============================================= * ==================================================================== */ + package org.onap.music.rest; import java.util.HashMap; @@ -41,27 +42,27 @@ import io.swagger.annotations.ApiOperation; @Path("/v{version: [0-9]+}/test") @Api(value="Test Api") public class RestMusicTestAPI { - - @SuppressWarnings("unused") + + @SuppressWarnings("unused") private EELFLoggerDelegate logger =EELFLoggerDelegate.getLogger(RestMusicTestAPI.class); - /** - * Returns a test JSON. This will confirm that REST is working. - * @return - */ - @GET - @ApiOperation(value = "Get Test", response = Map.class) - @Produces(MediaType.APPLICATION_JSON) - public Map<String, HashMap<String, String>> simpleTests( - @Context HttpServletResponse response) { - response.addHeader("X-latestVersion",MusicUtil.getVersion()); - Map<String, HashMap<String, String>> testMap = new HashMap<>(); - for(int i=0; i < 3; i++){ - HashMap<String, String> innerMap = new HashMap<>(); - innerMap.put(i+"", i+1+""); - innerMap.put(i+1+"", i+2+""); - testMap.put(i+"", innerMap); - } - return testMap; - } + /** + * Returns a test JSON. This will confirm that REST is working. + * @return + */ + @GET + @ApiOperation(value = "Get Test", response = Map.class) + @Produces(MediaType.APPLICATION_JSON) + public Map<String, HashMap<String, String>> simpleTests( + @Context HttpServletResponse response) { + response.addHeader("X-latestVersion",MusicUtil.getVersion()); + Map<String, HashMap<String, String>> testMap = new HashMap<>(); + for(int i=0; i < 3; i++){ + HashMap<String, String> innerMap = new HashMap<>(); + innerMap.put("Music Version",MusicUtil.getVersion()); + innerMap.put(i+1+"", i+2+""); + testMap.put(i+"", innerMap); + } + return testMap; + } } |