Package lv.id.jc.piglatin.controller
Class PigLatinController
java.lang.Object
lv.id.jc.piglatin.controller.PigLatinController
- All Implemented Interfaces:
PigLatinApi
PigLatinController handles translation requests for translating English sentences to Pig Latin.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<TranslationResponse> translate
(TranslationRequest translationRequest) POST /pig-latin : Translate text to Pig Latin Translate English text to Pig Latin following the rules described in the [description](#/info/description).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface lv.id.jc.piglatin.api.PigLatinApi
getRequest
-
Constructor Details
-
PigLatinController
-
-
Method Details
-
translate
public org.springframework.http.ResponseEntity<TranslationResponse> translate(TranslationRequest translationRequest) Description copied from interface:PigLatinApi
POST /pig-latin : Translate text to Pig Latin Translate English text to Pig Latin following the rules described in the [description](#/info/description).- Specified by:
translate
in interfacePigLatinApi
- Parameters:
translationRequest
- (required)- Returns:
- English sentence successfully translated into Pig Latin. (status code 200) or The request body is invalid. The response body contains the error message. (status code 400) or This cannot be translated into Pig Latin... (status code 418)
-