Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sprachschulsystem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan Pokorný
Sprachschulsystem
Commits
232d51e0
There was an error fetching the commit references. Please try again later.
Commit
232d51e0
authored
1 year ago
by
evilimkova
Browse files
Options
Downloads
Patches
Plain Diff
Fixing OpenApi descriptions
parent
f0ab89c0
No related branches found
No related tags found
1 merge request
!36
M2 fix certificate
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
application/module-certificate/src/main/java/org/fuseri/modulecertificate/certificate/CertificateController.java
+5
-4
5 additions, 4 deletions
.../modulecertificate/certificate/CertificateController.java
with
5 additions
and
4 deletions
application/module-certificate/src/main/java/org/fuseri/modulecertificate/certificate/CertificateController.java
+
5
−
4
View file @
232d51e0
...
...
@@ -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
=
"In
valid input
."
)
@ApiResponse
(
responseCode
=
"500"
,
description
=
"In
ternal 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
=
"In
valid input
."
),
@ApiResponse
(
responseCode
=
"500"
,
description
=
"In
ternal 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
=
"In
valid input
."
),
@ApiResponse
(
responseCode
=
"500"
,
description
=
"In
ternal 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
=
"In
valid page number supplied
"
)
,
@ApiResponse
(
responseCode
=
"500"
,
description
=
"In
ternal server error.
"
)
})
@GetMapping
public
ResponseEntity
<
Page
<
CertificateSimpleDto
>>
findAllCertificates
(
Pageable
pageable
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment