diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoController.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoController.java index c60677c..e328ee2 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoController.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoController.java @@ -5,11 +5,14 @@ import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; +import java.util.List; +import java.util.UUID; + @Controller public class InfoController { @PostMapping("/info") public ResponseEntity getInfo(@RequestBody Object ignored) { - return ResponseEntity.ok(new InfoResponse(":)")); + return ResponseEntity.ok(new InfoResponse(UUID.nameUUIDFromBytes(":)".getBytes()), ":)", List.of())); } } diff --git a/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoResponse.java b/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoResponse.java index 5810c02..1e26313 100644 --- a/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoResponse.java +++ b/src/main/java/edu/harvard/dbmi/avillach/dictionary/info/InfoResponse.java @@ -1,4 +1,7 @@ package edu.harvard.dbmi.avillach.dictionary.info; -public record InfoResponse(String response) { -} +import java.util.List; +import java.util.UUID; + +public record InfoResponse(UUID id, String name, List queryFormats) { +} \ No newline at end of file diff --git a/src/test/java/edu/harvard/dbmi/avillach/dictionary/info/InfoControllerTest.java b/src/test/java/edu/harvard/dbmi/avillach/dictionary/info/InfoControllerTest.java index ccf8e0d..0e39cdb 100644 --- a/src/test/java/edu/harvard/dbmi/avillach/dictionary/info/InfoControllerTest.java +++ b/src/test/java/edu/harvard/dbmi/avillach/dictionary/info/InfoControllerTest.java @@ -7,6 +7,9 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; +import java.util.List; +import java.util.UUID; + @SpringBootTest class InfoControllerTest { @@ -19,6 +22,6 @@ void shouldGetInfo() { ResponseEntity actual = infoController.getInfo(new Object()); Assertions.assertEquals(HttpStatus.OK, actual.getStatusCode()); - Assertions.assertEquals(new InfoResponse(":)"), actual.getBody()); + Assertions.assertEquals(new InfoResponse(UUID.nameUUIDFromBytes(":)".getBytes()), ":)", List.of()), actual.getBody()); } } \ No newline at end of file