Class TaskCreateController
java.lang.Object
fr.tiogars.chat.domains.task.controllers.TaskCreateController
Exposes the endpoint that creates domain records.
- Since:
- 0.1.0
-
Constructor Summary
ConstructorsConstructorDescriptionTaskCreateController(TaskCreateService service) Creates the record creation endpoint. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Task> createTask(@Valid CreateTaskRequest request) Creates a new version of a domain record.
-
Constructor Details
-
TaskCreateController
Creates the record creation endpoint.- Parameters:
service- domain record creation service
-
-
Method Details
-
createTask
@PostMapping("/api/v1/task") public org.springframework.http.ResponseEntity<Task> createTask(@Valid @RequestBody @Valid CreateTaskRequest request) Creates a new version of a domain record.- Parameters:
request- validated version and payload to create- Returns:
- a created response containing the record, or a conflict response when the version exists
-