Skip to content

OpenAPI Specification

JiEun Lee edited this page Nov 16, 2020 · 2 revisions

미완성

API 명세서

PASTEL API

Auth

GET /auth/gihub

GET /logout

iOS

GET /ios/register

Request

username : "nickname"

Response

{
	message : "회원가입 성공", 
	sid : 1
}

User

GET /api/user/all

Response

{
	message : "모든 유저 성공",
	allUser : [
		{
			"sid" : 1,
			"nickname" : "zlrlo",
			"profile_image_url" : "https://url.com"
		},
		{
			"sid" : 2,
			"nickname" : "puba",
			"profile_image_url" : "https://url.com"
		},
		{
			"sid" : 3,
			"nickname" : "msmk",
			"profile_image_url" : "https://url.com"
		},
	]
}

POST /api/user

Request

id = 'nickname'
profileImageUrl = 'url'
password = 'password'

Response

{
	message : "회원가입 성공",
	insertId : 1
}

POST /api/user/login

Request

username = 'testuser'
password = 'password'

Response

{
	message : "logged in successfully"
}

Issue

GET api/issue/all

Response

{
	message: "issues", issuesInfo: {
	issuesInfo:
		issuesArray: 
		[
			{
				color: "#11aa22"
				created_at: "2020-11-11T15:00:00.000Z"
				id: 1
				issue_name: "OAuth 로그인구현"
				issue_status: 0
				label_name: "Web"
				milestone_name: "backend 마일스톤"
				nickname: "testuser"
				profile_image_url: "https://url.com"
			},
		 {},
		 {},
		]
		labelCount: 3
		milestoneCount: 1
	}
}

POST api/issue

Request

{
  user_sid: 2,
  issue_content:"content",
  issue_name:"name",
  created_at:"",
  milestone_id: 1,
  issue_status:"open",
}

PUT api/issue

Request

{
	id: 1,
  user_sid: 2,
  issue_content:"content",
  issue_name:"name",
  created_at:"",
  milestone_id: 1,
  issue_status:"open",
}

DELETE api/issue

Request

{
	id: 1,
}

Label

GET /api/label/all

GET /api/label

Response

{
	labels : [
		{
			color: "#afe4fa"
			id: 1
			label_description: "This is bug"
			label_name: "bug"
		}, {}, {}
	]
	message: "레이블 읽기 성공"
}

POST /api/label

Request

{
  label_name: "name",
  label_description: "desc",
  color: "color"
}

PUT /api/label

Request

{
  id: "id",
  label_name: "name",
  label_description: "desc",
  color: "color"
}

DELETE /api/label

Request

{
  id: "id",  
}

Milestone

GET /api/milestone/all

Request

status = 0 
(0 : open, 1 : close)

Response

{
	"message": "milestones",
	"milestonesInfo" : {
	"openTotalCount" : 1,
	"closeTotalCount" : 0,
	"milestoneArray" : [
		{
			"id" : 1,
			"milestone_name" : "backend milestone",
			"milestone_description" : "backend 마일스톤입니다.",
			"end_date" : "2020-11-15",
			"status": 0,
			"open_count": 1,
			"close_count": 1
		}
	]
}

POST /api/milestone

Request

milestone_name : "backend 마일스톤" 
milestone_description : "backend 마일스톤 입니다."
end_date : "2020-11-15"
status : 0 
(0 : open, 1 : close)

Response

{
		"message": "마일스톤 등록 성공",
		"insertId": 2
}

PUT /api/milestone

Request

milestone_name : "front 마일스톤" 
milestone_description : "front 마일스톤 입니다."
end_date : "2020-11-15"
status : 0 
(0 : open, 1 : close)

Response

{
	"message": "마일스톤 업데이트 성공",
	"insertId": 0
}

DELETE /api/milestone

Request

id : 1

Response

{
	"message": "마일스톤 삭제 성공"
}
Clone this wiki locally