Class PatientController

java.lang.Object
com.oc_p9.patient_service.controller.PatientController

@RestController @RequestMapping("/api/patients") public class PatientController extends Object
  • Field Details

  • Constructor Details

    • PatientController

      public PatientController()
  • Method Details

    • getPatients

      @GetMapping public org.springframework.http.ResponseEntity<List<PatientDTO>> getPatients()
    • getPatientById

      @GetMapping("/{id}") public org.springframework.http.ResponseEntity<PatientDTO> getPatientById(@PathVariable int id)
    • updatePatient

      @PutMapping("/{id}") public org.springframework.http.ResponseEntity<PatientDTO> updatePatient(@PathVariable int id, @Valid @RequestBody @Valid PatientDTO dto)
    • addPatient

      @PostMapping public org.springframework.http.ResponseEntity<PatientDTO> addPatient(@Valid @RequestBody @Valid PatientDTO patientDto)