-
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 Project Create API (#32)
- Loading branch information
1 parent
b3b9d5b
commit ede8d3b
Showing
29 changed files
with
1,087 additions
and
90 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,29 @@ | ||
post: | ||
tags: | ||
- Projects | ||
operationId: create | ||
summary: Create new project | ||
requestBody: | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/ProjectCreateRequest.yaml | ||
responses: | ||
"200": | ||
description: OK - Returns newly created project | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/ProjectCreateResponse.yaml | ||
"400": | ||
description: Bad Request - Invalid request | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/ProjectCreateErrorResponse.yaml | ||
"500": | ||
description: Internal Server Error - Server error | ||
content: | ||
application/json: | ||
schema: | ||
$ref: ../../schemas/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 Response Body for Project Create API | ||
properties: | ||
message: | ||
type: string | ||
description: Error message when request body format is invalid | ||
example: unexpected EOF | ||
user: | ||
$ref: ./UserError.yaml | ||
project: | ||
$ref: ./ProjectWithoutAutofieldError.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,10 @@ | ||
type: object | ||
description: Request Body for Project Create API | ||
properties: | ||
user: | ||
$ref: ./User.yaml | ||
project: | ||
$ref: ./ProjectWithoutAutofield.yaml | ||
required: | ||
- user | ||
- project |
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 Project Create API | ||
properties: | ||
project: | ||
$ref: ./Project.yaml | ||
required: | ||
- project |
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,15 @@ | ||
type: object | ||
description: Project object without auto-generated fields | ||
properties: | ||
name: | ||
type: string | ||
maxLength: 100 | ||
description: Project name | ||
example: My Project | ||
description: | ||
type: string | ||
maxLength: 400 | ||
description: Project description | ||
example: This is my project | ||
required: | ||
- name |
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 ProjectWithoutAutofield object | ||
properties: | ||
name: | ||
type: string | ||
description: Error message for project name | ||
example: project name is required, but got '' | ||
description: | ||
type: string | ||
description: Error message for project description | ||
example: project description must be less than or equal to 400 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
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.