Skip to content
Snippets Groups Projects
Commit 232d51e0 authored by evilimkova's avatar evilimkova
Browse files

Fixing OpenApi descriptions

parent f0ab89c0
No related branches found
No related tags found
1 merge request!36M2 fix certificate
......@@ -43,7 +43,7 @@ public class CertificateController {
description = "Generates certificate, saves it into database and returns certificate information and certificate file.")
@ApiResponses(value = {
@ApiResponse(responseCode = "201", description = "Certificate generated successfully."),
@ApiResponse(responseCode = "500", description = "Invalid input.")
@ApiResponse(responseCode = "500", description = "Internal server error.")
})
@PostMapping
public ResponseEntity<CertificateSimpleDto> generate(@Valid @RequestBody CertificateCreateDto certificateCreateDto) {
......@@ -77,7 +77,7 @@ public class CertificateController {
@Operation(summary = "Get certificates for user", description = "Returns certificates for given user in list.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successfully retrieved certificates"),
@ApiResponse(responseCode = "500", description = "Invalid input."),
@ApiResponse(responseCode = "500", description = "Internal server error."),
})
@GetMapping("/findForUser")
public ResponseEntity<List<CertificateSimpleDto>> findForUser(@RequestParam Long userId) {
......@@ -96,7 +96,7 @@ public class CertificateController {
description = "Returns certificates for given user and course in list.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successfully retrieved certificates"),
@ApiResponse(responseCode = "500", description = "Invalid input."),
@ApiResponse(responseCode = "500", description = "Internal server error."),
})
@GetMapping("/findForUserAndCourse")
public ResponseEntity<List<CertificateSimpleDto>> findForUserAndCourse(@RequestParam Long userId, @RequestParam Long courseId) {
......@@ -111,6 +111,7 @@ public class CertificateController {
@Operation(summary = "Delete a certificate with specified ID", description = "Deletes a certificate with the specified ID.")
@ApiResponses(value = {
@ApiResponse(responseCode = "204", description = "Certificate with the specified ID deleted successfully."),
@ApiResponse(responseCode = "500", description = "Internal server error.")
})
@DeleteMapping("/{id}")
public ResponseEntity<Void> delete(@NotNull @PathVariable Long id) {
......@@ -126,7 +127,7 @@ public class CertificateController {
@Operation(summary = "Get certificates in paginated format", description = "Returns certificates in paginated format.")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "Successfully retrieved paginated certificates"),
@ApiResponse(responseCode = "500", description = "Invalid page number supplied"),
@ApiResponse(responseCode = "500", description = "Internal server error.")
})
@GetMapping
public ResponseEntity<Page<CertificateSimpleDto>> findAllCertificates(Pageable pageable) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment