This specification is for a REST-like service that will take a given word and, after confirming that it exists in a given dictionary, will return any anagrams of that word.
- The application must be written in Spring Boot
- The application must use the dictionary located here
GET /word/:word
-
Returns
200 OKif the word exists in the dictionary.GET /word/glare HTTP 200 OK { "word": "glare", "anagrams": [ "Alger", "lager", "large", "regal" ] }Notes:
- The list of words in
anagramsmust not contain the requested word itself. - The list of words in
anagramsmust be sorted alphabetically. - The list of words in
anagramsmust be returned in their original case.
- The list of words in
-
Returns
404 Not Foundif the word does not exist in the dictionary, with the response bodyGET /word/asdfasdf1234 HTTP 404 Not Found { "message" : "Couldn't find word asdfasdf1234" } -
Returns
404 Not Foundif the word is not specified (GET /word). The response body here is irrelevant