Class PigLatinController

java.lang.Object
lv.id.jc.piglatin.controller.PigLatinController
All Implemented Interfaces:
PigLatinApi

@RestController public class PigLatinController extends Object implements PigLatinApi
PigLatinController handles translation requests for translating English sentences to Pig Latin.
  • Constructor Details

  • 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 interface PigLatinApi
      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)