rxue / dictionary

Practice in Java EE
0 stars 0 forks source link

dictionary/web > bug : language output of endpoint http://localhost/dictionary/rest/lexicalitems/2 is too lengthy #145

Closed rxue closed 1 month ago

rxue commented 1 month ago

in the output of http://localhost/dictionary/rest/lexicalitems/2

{"explanations":[{"explanation":"dull","id":13,"language":{"ISO3Country":"","ISO3Language":"eng","country":"","displayCountry":"","displayLanguage":"English","displayName":"English","displayScript":"","displayVariant":"","extensionKeys":[],"language":"en","script":"","unicodeLocaleAttributes":[],"unicodeLocaleKeys":[],"variant":""},"partOfSpeech":"ADJ","sentences":["You might feel dry"]}],"id":2,"language":{"ISO3Country":"","ISO3Language":"eng","country":"","displayCountry":"","displayLanguage":"English","displayName":"English","displayScript":"","displayVariant":"","extensionKeys":[],"language":"en","script":"","unicodeLocaleAttributes":[],"unicodeLocaleKeys":[],"variant":""},"value":"dry"}

the language displays too much irrelevant information. displayLanguage is enough

rxue commented 1 month ago

TODO

Make an ExplanationsByLanguageDTO for the representation of RESTful API output

rxue commented 1 month ago

Problem The draft of ExplanationsByLanguageDTO cannot display anthing

rxue commented 1 month ago

TODO atm ExplanationsByLanguage displays the hard-coded dummy result, make it display the actual result retrieved from the database

rxue commented 1 month ago

TODO LexicalItemResource.get has partial implementation in hard-code, implement it to get the actual result from database