-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement Paper Update API (#71)
- Loading branch information
1 parent
eb9f0c3
commit d4de519
Showing
25 changed files
with
1,121 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
post: | ||
tags: | ||
- Papers | ||
operationId: papers-update | ||
summary: Update paper | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/interface/papers/update/PaperUpdateRequest.yaml | ||
responses: | ||
"200": | ||
description: OK - Returns updated paper | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/interface/papers/update/PaperUpdateResponse.yaml | ||
"400": | ||
description: Bad Request - Invalid request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/interface/papers/update/PaperUpdateErrorResponse.yaml | ||
"404": | ||
description: Not Found - Paper not found or not authorized | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/interface/papers/update/PaperUpdateErrorResponse.yaml | ||
"500": | ||
description: Internal Server Error - Server error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/interface/app/ApplicationErrorResponse.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
type: object | ||
description: Error Message for Paper object | ||
properties: | ||
id: | ||
type: string | ||
description: Error message for paper id | ||
example: paper id is required, but got '' | ||
content: | ||
type: string | ||
description: Error message for paper content | ||
example: paper content must be less than or equal to 40000 bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
docs/openapi/schemas/entity/paper/PaperWithoutAutofieldError.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
type: object | ||
description: Error Message for Paper object | ||
description: Error Message for PaperWithoutAutofield object | ||
properties: | ||
content: | ||
type: string | ||
description: Error message for paper content | ||
example: paper content must be less than or equal to 40000 bytes | ||
example: paper content must be less than or equal to 40000 bytes, but got 43210 bytes |
2 changes: 1 addition & 1 deletion
2
docs/openapi/schemas/interface/papers/find/PaperFindErrorResponse.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
docs/openapi/schemas/interface/papers/update/PaperUpdateErrorResponse.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
type: object | ||
description: Error Response Body for Paper Update API | ||
properties: | ||
message: | ||
type: string | ||
description: Error message when request body format is invalid | ||
example: unexpected EOF | ||
user: | ||
$ref: ../../../entity/user/UserOnlyIdError.yaml | ||
project: | ||
$ref: ../../../entity/project/ProjectOnlyIdError.yaml | ||
paper: | ||
$ref: ../../../entity/paper/PaperError.yaml | ||
required: | ||
- user | ||
- project | ||
- paper |
13 changes: 13 additions & 0 deletions
13
docs/openapi/schemas/interface/papers/update/PaperUpdateRequest.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
type: object | ||
description: Request Body for Paper Update API | ||
properties: | ||
user: | ||
$ref: ../../../entity/user/UserOnlyId.yaml | ||
project: | ||
$ref: ../../../entity/project/ProjectOnlyId.yaml | ||
paper: | ||
$ref: ../../../entity/paper/Paper.yaml | ||
required: | ||
- user | ||
- project | ||
- paper |
7 changes: 7 additions & 0 deletions
7
docs/openapi/schemas/interface/papers/update/PaperUpdateResponse.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
type: object | ||
description: Response Body for Paper Update API | ||
properties: | ||
paper: | ||
$ref: ../../../entity/paper/Paper.yaml | ||
required: | ||
- paper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.