Exam
This commit is contained in:
774
docs/docs.go
774
docs/docs.go
@ -20,7 +20,7 @@ const docTemplate = `{
|
||||
"paths": {
|
||||
"/auth/login": {
|
||||
"post": {
|
||||
"description": "username, password 를 입력하여 로그인",
|
||||
"description": "사용자가 로그인합니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -30,24 +30,15 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"로그인"
|
||||
],
|
||||
"summary": "로그인",
|
||||
"summary": "사용자 로그인 로그인",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "username",
|
||||
"name": "username",
|
||||
"description": "Login Body",
|
||||
"name": "loginBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "비밀번호",
|
||||
"name": "password",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.LoginRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -76,30 +67,12 @@ const docTemplate = `{
|
||||
"summary": "회원가입",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "username",
|
||||
"name": "username",
|
||||
"description": "Register Body",
|
||||
"name": "registerBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "이름",
|
||||
"name": "name",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "비밀번호",
|
||||
"name": "password",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.RegisterRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -113,6 +86,177 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/exam": {
|
||||
"get": {
|
||||
"description": "응시 목록을 가져옵니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "응시 목록 가져오기",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "검색어",
|
||||
"name": "q",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "페이지",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "페이지 사이즈",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamListResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"description": "퀴즈 프로그램을 수정합니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "퀴즈 프로그램 수정",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Exam Update Body",
|
||||
"name": "examUpdateBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamUpdateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "응시 매칭을 만듭니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "응시 매칭 생성",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Exam Body",
|
||||
"name": "examBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "퀴즈 프로그램 정보를 변경합니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "퀴즈 프로그램 정보 변경",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Exam Patch Body (변경할 필드만 입력)",
|
||||
"name": "examPatchBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamPatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/exam/{id}": {
|
||||
"get": {
|
||||
"description": "ID로 응시 정보를 가져옵니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "응시(시험) 정보 가져오기",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "응시 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/program": {
|
||||
"get": {
|
||||
"description": "퀴즈 프로그램 목록을 가져옵니다.",
|
||||
@ -175,60 +319,12 @@ const docTemplate = `{
|
||||
"summary": "퀴즈 프로그램 수정",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "프로그램 제목",
|
||||
"name": "subject",
|
||||
"description": "Program Body",
|
||||
"name": "programUpdateBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 코스",
|
||||
"name": "course",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 내용",
|
||||
"name": "content",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 태그",
|
||||
"name": "tag",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 상태 on 또는 off",
|
||||
"name": "status",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 발행 날짜",
|
||||
"name": "publish_at",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ProgramRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -255,60 +351,12 @@ const docTemplate = `{
|
||||
"summary": "퀴즈 프로그램 생성",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "프로그램 제목",
|
||||
"name": "subject",
|
||||
"description": "Program Body",
|
||||
"name": "programBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 코스",
|
||||
"name": "course",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 내용",
|
||||
"name": "content",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 태그",
|
||||
"name": "tag",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 상태 on 또는 off",
|
||||
"name": "status",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 발행 날짜",
|
||||
"name": "publish_at",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ProgramRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -417,88 +465,12 @@ const docTemplate = `{
|
||||
"summary": "퀴즈 수정",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "퀴즈 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "프로그램 ID",
|
||||
"name": "program_id",
|
||||
"description": "Quiz Body",
|
||||
"name": "quizBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 순서",
|
||||
"name": "sequence",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 타입 : choice, check, ox, input",
|
||||
"name": "quiz_type",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 문제",
|
||||
"name": "question",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 선택지 : ['선택1','선택2','선택3', '선택4']",
|
||||
"name": "choice",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 정답 : [1,3]",
|
||||
"name": "answer",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 힌트",
|
||||
"name": "hint",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 해설",
|
||||
"name": "comment",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.QuizRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -525,81 +497,12 @@ const docTemplate = `{
|
||||
"summary": "퀴즈 생성",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "프로그램 ID",
|
||||
"name": "program_id",
|
||||
"description": "Quiz Body",
|
||||
"name": "quizBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 순서",
|
||||
"name": "sequence",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 타입 : choice, check, ox, input",
|
||||
"name": "quiz_type",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 문제",
|
||||
"name": "question",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 선택지 : ['선택1','선택2','선택3', '선택4']",
|
||||
"name": "choice",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 정답 : [1,3]",
|
||||
"name": "answer",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 힌트",
|
||||
"name": "hint",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 해설",
|
||||
"name": "comment",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.QuizRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -756,6 +659,221 @@ const docTemplate = `{
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"learnsteam_learsteam-quiz-api_internal_models.Exam": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "ef74c59a-c707-4162-a52b-455906c81ec1"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "홍길순"
|
||||
},
|
||||
"program": {
|
||||
"type": "string",
|
||||
"example": "파이썬 초급 과정"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "ready"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "출력 Print"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "f95159dd-c42c-490d-ac6b-ca5d88a266bb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.Exam"
|
||||
}
|
||||
},
|
||||
"page": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"pageSize": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 999
|
||||
},
|
||||
"totalPage": {
|
||||
"type": "integer",
|
||||
"example": 99
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamPatchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:25:00+09:00"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 4
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:10:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "rating"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:25:00+09:00"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "ef74c59a-c707-4162-a52b-455906c81ec1"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "홍길순"
|
||||
},
|
||||
"program": {
|
||||
"type": "string",
|
||||
"example": "파이썬 초급 과정"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:10:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "ready"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "출력 Print"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "f95159dd-c42c-490d-ac6b-ca5d88a266bb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamUpdateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:25:00+09:00"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "홍길순"
|
||||
},
|
||||
"program": {
|
||||
"type": "string",
|
||||
"example": "파이썬 초급 과정"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:10:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "ready"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "출력 Print"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "f95159dd-c42c-490d-ac6b-ca5d88a266bb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.LoginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.LoginResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -834,6 +952,37 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ProgramRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"example": "코스 설명"
|
||||
},
|
||||
"course": {
|
||||
"type": "string",
|
||||
"example": "코스 이름"
|
||||
},
|
||||
"publish_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T00:00:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "on"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "프로그램 제목"
|
||||
},
|
||||
"tag": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ProgramResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -945,6 +1094,41 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.QuizRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"answer": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"choice": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"hint": {
|
||||
"type": "string"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
},
|
||||
"quiz_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.QuizResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -990,6 +1174,20 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.RegisterRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.RegisterResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -12,7 +12,7 @@
|
||||
"paths": {
|
||||
"/auth/login": {
|
||||
"post": {
|
||||
"description": "username, password 를 입력하여 로그인",
|
||||
"description": "사용자가 로그인합니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@ -22,24 +22,15 @@
|
||||
"tags": [
|
||||
"로그인"
|
||||
],
|
||||
"summary": "로그인",
|
||||
"summary": "사용자 로그인 로그인",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "username",
|
||||
"name": "username",
|
||||
"description": "Login Body",
|
||||
"name": "loginBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "비밀번호",
|
||||
"name": "password",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.LoginRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -68,30 +59,12 @@
|
||||
"summary": "회원가입",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "username",
|
||||
"name": "username",
|
||||
"description": "Register Body",
|
||||
"name": "registerBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "이름",
|
||||
"name": "name",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "비밀번호",
|
||||
"name": "password",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.RegisterRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -105,6 +78,177 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/exam": {
|
||||
"get": {
|
||||
"description": "응시 목록을 가져옵니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "응시 목록 가져오기",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "검색어",
|
||||
"name": "q",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "페이지",
|
||||
"name": "page",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "페이지 사이즈",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamListResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"description": "퀴즈 프로그램을 수정합니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "퀴즈 프로그램 수정",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Exam Update Body",
|
||||
"name": "examUpdateBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamUpdateRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"description": "응시 매칭을 만듭니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "응시 매칭 생성",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Exam Body",
|
||||
"name": "examBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"patch": {
|
||||
"description": "퀴즈 프로그램 정보를 변경합니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "퀴즈 프로그램 정보 변경",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Exam Patch Body (변경할 필드만 입력)",
|
||||
"name": "examPatchBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamPatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/exam/{id}": {
|
||||
"get": {
|
||||
"description": "ID로 응시 정보를 가져옵니다.",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"Exam"
|
||||
],
|
||||
"summary": "응시(시험) 정보 가져오기",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "응시 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/program": {
|
||||
"get": {
|
||||
"description": "퀴즈 프로그램 목록을 가져옵니다.",
|
||||
@ -167,60 +311,12 @@
|
||||
"summary": "퀴즈 프로그램 수정",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "프로그램 제목",
|
||||
"name": "subject",
|
||||
"description": "Program Body",
|
||||
"name": "programUpdateBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 코스",
|
||||
"name": "course",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 내용",
|
||||
"name": "content",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 태그",
|
||||
"name": "tag",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 상태 on 또는 off",
|
||||
"name": "status",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 발행 날짜",
|
||||
"name": "publish_at",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ProgramRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -247,60 +343,12 @@
|
||||
"summary": "퀴즈 프로그램 생성",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "프로그램 제목",
|
||||
"name": "subject",
|
||||
"description": "Program Body",
|
||||
"name": "programBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 코스",
|
||||
"name": "course",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 내용",
|
||||
"name": "content",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 태그",
|
||||
"name": "tag",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 상태 on 또는 off",
|
||||
"name": "status",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "프로그램 발행 날짜",
|
||||
"name": "publish_at",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.ProgramRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -409,88 +457,12 @@
|
||||
"summary": "퀴즈 수정",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"description": "퀴즈 ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "프로그램 ID",
|
||||
"name": "program_id",
|
||||
"description": "Quiz Body",
|
||||
"name": "quizBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 순서",
|
||||
"name": "sequence",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 타입 : choice, check, ox, input",
|
||||
"name": "quiz_type",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 문제",
|
||||
"name": "question",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 선택지 : ['선택1','선택2','선택3', '선택4']",
|
||||
"name": "choice",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 정답 : [1,3]",
|
||||
"name": "answer",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 힌트",
|
||||
"name": "hint",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 해설",
|
||||
"name": "comment",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.QuizRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -517,81 +489,12 @@
|
||||
"summary": "퀴즈 생성",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "프로그램 ID",
|
||||
"name": "program_id",
|
||||
"description": "Quiz Body",
|
||||
"name": "quizBody",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 순서",
|
||||
"name": "sequence",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 타입 : choice, check, ox, input",
|
||||
"name": "quiz_type",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 문제",
|
||||
"name": "question",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 선택지 : ['선택1','선택2','선택3', '선택4']",
|
||||
"name": "choice",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 정답 : [1,3]",
|
||||
"name": "answer",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 힌트",
|
||||
"name": "hint",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"description": "퀴즈 해설",
|
||||
"name": "comment",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.QuizRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -748,6 +651,221 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"learnsteam_learsteam-quiz-api_internal_models.Exam": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "ef74c59a-c707-4162-a52b-455906c81ec1"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "홍길순"
|
||||
},
|
||||
"program": {
|
||||
"type": "string",
|
||||
"example": "파이썬 초급 과정"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "ready"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "출력 Print"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "f95159dd-c42c-490d-ac6b-ca5d88a266bb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamListResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/learnsteam_learsteam-quiz-api_internal_models.Exam"
|
||||
}
|
||||
},
|
||||
"page": {
|
||||
"type": "integer",
|
||||
"example": 1
|
||||
},
|
||||
"pageSize": {
|
||||
"type": "integer",
|
||||
"example": 10
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 999
|
||||
},
|
||||
"totalPage": {
|
||||
"type": "integer",
|
||||
"example": 99
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamPatchRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:25:00+09:00"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 4
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:10:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "rating"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"users": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:25:00+09:00"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"example": "ef74c59a-c707-4162-a52b-455906c81ec1"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "홍길순"
|
||||
},
|
||||
"program": {
|
||||
"type": "string",
|
||||
"example": "파이썬 초급 과정"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:10:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "ready"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "출력 Print"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "f95159dd-c42c-490d-ac6b-ca5d88a266bb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ExamUpdateRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"end_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:25:00+09:00"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"example": "홍길순"
|
||||
},
|
||||
"program": {
|
||||
"type": "string",
|
||||
"example": "파이썬 초급 과정"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string",
|
||||
"example": "7f9329f5-2e36-4638-92d2-73064b7291a4"
|
||||
},
|
||||
"score": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"start_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T13:10:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "ready"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "출력 Print"
|
||||
},
|
||||
"total": {
|
||||
"type": "integer",
|
||||
"example": 5
|
||||
},
|
||||
"user_id": {
|
||||
"type": "string",
|
||||
"example": "f95159dd-c42c-490d-ac6b-ca5d88a266bb"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.LoginRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.LoginResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -826,6 +944,37 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ProgramRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {
|
||||
"type": "string",
|
||||
"example": "코스 설명"
|
||||
},
|
||||
"course": {
|
||||
"type": "string",
|
||||
"example": "코스 이름"
|
||||
},
|
||||
"publish_at": {
|
||||
"type": "string",
|
||||
"example": "2023-11-10T00:00:00+09:00"
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"example": "on"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string",
|
||||
"example": "프로그램 제목"
|
||||
},
|
||||
"tag": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.ProgramResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -937,6 +1086,41 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.QuizRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"answer": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"choice": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"comment": {
|
||||
"type": "string"
|
||||
},
|
||||
"hint": {
|
||||
"type": "string"
|
||||
},
|
||||
"program_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"question": {
|
||||
"type": "string"
|
||||
},
|
||||
"quiz_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"sequence": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.QuizResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@ -982,6 +1166,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.RegisterRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"password": {
|
||||
"type": "string"
|
||||
},
|
||||
"username": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"learnsteam_learsteam-quiz-api_internal_models.RegisterResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
@ -1,4 +1,158 @@
|
||||
definitions:
|
||||
learnsteam_learsteam-quiz-api_internal_models.Exam:
|
||||
properties:
|
||||
end_at:
|
||||
type: string
|
||||
id:
|
||||
example: ef74c59a-c707-4162-a52b-455906c81ec1
|
||||
type: string
|
||||
name:
|
||||
example: 홍길순
|
||||
type: string
|
||||
program:
|
||||
example: 파이썬 초급 과정
|
||||
type: string
|
||||
program_id:
|
||||
example: 7f9329f5-2e36-4638-92d2-73064b7291a4
|
||||
type: string
|
||||
score:
|
||||
example: 5
|
||||
type: integer
|
||||
start_at:
|
||||
type: string
|
||||
status:
|
||||
example: ready
|
||||
type: string
|
||||
subject:
|
||||
example: 출력 Print
|
||||
type: string
|
||||
total:
|
||||
example: 5
|
||||
type: integer
|
||||
user_id:
|
||||
example: f95159dd-c42c-490d-ac6b-ca5d88a266bb
|
||||
type: string
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ExamListResponse:
|
||||
properties:
|
||||
data:
|
||||
items:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.Exam'
|
||||
type: array
|
||||
page:
|
||||
example: 1
|
||||
type: integer
|
||||
pageSize:
|
||||
example: 10
|
||||
type: integer
|
||||
total:
|
||||
example: 999
|
||||
type: integer
|
||||
totalPage:
|
||||
example: 99
|
||||
type: integer
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ExamPatchRequest:
|
||||
properties:
|
||||
end_at:
|
||||
example: "2023-11-10T13:25:00+09:00"
|
||||
type: string
|
||||
score:
|
||||
example: 4
|
||||
type: integer
|
||||
start_at:
|
||||
example: "2023-11-10T13:10:00+09:00"
|
||||
type: string
|
||||
status:
|
||||
example: rating
|
||||
type: string
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ExamRequest:
|
||||
properties:
|
||||
program_id:
|
||||
example: 7f9329f5-2e36-4638-92d2-73064b7291a4
|
||||
type: string
|
||||
users:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ExamResponse:
|
||||
properties:
|
||||
end_at:
|
||||
example: "2023-11-10T13:25:00+09:00"
|
||||
type: string
|
||||
id:
|
||||
example: ef74c59a-c707-4162-a52b-455906c81ec1
|
||||
type: string
|
||||
name:
|
||||
example: 홍길순
|
||||
type: string
|
||||
program:
|
||||
example: 파이썬 초급 과정
|
||||
type: string
|
||||
program_id:
|
||||
example: 7f9329f5-2e36-4638-92d2-73064b7291a4
|
||||
type: string
|
||||
score:
|
||||
example: 5
|
||||
type: integer
|
||||
start_at:
|
||||
example: "2023-11-10T13:10:00+09:00"
|
||||
type: string
|
||||
status:
|
||||
example: ready
|
||||
type: string
|
||||
subject:
|
||||
example: 출력 Print
|
||||
type: string
|
||||
total:
|
||||
example: 5
|
||||
type: integer
|
||||
user_id:
|
||||
example: f95159dd-c42c-490d-ac6b-ca5d88a266bb
|
||||
type: string
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ExamUpdateRequest:
|
||||
properties:
|
||||
end_at:
|
||||
example: "2023-11-10T13:25:00+09:00"
|
||||
type: string
|
||||
name:
|
||||
example: 홍길순
|
||||
type: string
|
||||
program:
|
||||
example: 파이썬 초급 과정
|
||||
type: string
|
||||
program_id:
|
||||
example: 7f9329f5-2e36-4638-92d2-73064b7291a4
|
||||
type: string
|
||||
score:
|
||||
example: 5
|
||||
type: integer
|
||||
start_at:
|
||||
example: "2023-11-10T13:10:00+09:00"
|
||||
type: string
|
||||
status:
|
||||
example: ready
|
||||
type: string
|
||||
subject:
|
||||
example: 출력 Print
|
||||
type: string
|
||||
total:
|
||||
example: 5
|
||||
type: integer
|
||||
user_id:
|
||||
example: f95159dd-c42c-490d-ac6b-ca5d88a266bb
|
||||
type: string
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.LoginRequest:
|
||||
properties:
|
||||
password:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.LoginResponse:
|
||||
properties:
|
||||
refresh_token:
|
||||
@ -54,6 +208,28 @@ definitions:
|
||||
example: 99
|
||||
type: integer
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ProgramRequest:
|
||||
properties:
|
||||
content:
|
||||
example: 코스 설명
|
||||
type: string
|
||||
course:
|
||||
example: 코스 이름
|
||||
type: string
|
||||
publish_at:
|
||||
example: "2023-11-10T00:00:00+09:00"
|
||||
type: string
|
||||
status:
|
||||
example: "on"
|
||||
type: string
|
||||
subject:
|
||||
example: 프로그램 제목
|
||||
type: string
|
||||
tag:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.ProgramResponse:
|
||||
properties:
|
||||
content:
|
||||
@ -133,6 +309,29 @@ definitions:
|
||||
example: 1
|
||||
type: integer
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.QuizRequest:
|
||||
properties:
|
||||
answer:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
choice:
|
||||
items:
|
||||
type: integer
|
||||
type: array
|
||||
comment:
|
||||
type: string
|
||||
hint:
|
||||
type: string
|
||||
program_id:
|
||||
type: string
|
||||
question:
|
||||
type: string
|
||||
quiz_type:
|
||||
type: string
|
||||
sequence:
|
||||
type: integer
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.QuizResponse:
|
||||
properties:
|
||||
answer:
|
||||
@ -165,6 +364,15 @@ definitions:
|
||||
example: 5
|
||||
type: integer
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.RegisterRequest:
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
username:
|
||||
type: string
|
||||
type: object
|
||||
learnsteam_learsteam-quiz-api_internal_models.RegisterResponse:
|
||||
properties:
|
||||
refresh_token:
|
||||
@ -222,20 +430,14 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: username, password 를 입력하여 로그인
|
||||
description: 사용자가 로그인합니다.
|
||||
parameters:
|
||||
- description: username
|
||||
- description: Login Body
|
||||
in: body
|
||||
name: username
|
||||
name: loginBody
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 비밀번호
|
||||
in: body
|
||||
name: password
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.LoginRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@ -243,7 +445,7 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.LoginResponse'
|
||||
summary: 로그인
|
||||
summary: 사용자 로그인 로그인
|
||||
tags:
|
||||
- 로그인
|
||||
/auth/register:
|
||||
@ -252,24 +454,12 @@ paths:
|
||||
- application/json
|
||||
description: username, name, password 를 입력하여 회원가입
|
||||
parameters:
|
||||
- description: username
|
||||
- description: Register Body
|
||||
in: body
|
||||
name: username
|
||||
name: registerBody
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 이름
|
||||
in: body
|
||||
name: name
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 비밀번호
|
||||
in: body
|
||||
name: password
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.RegisterRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@ -280,6 +470,118 @@ paths:
|
||||
summary: 회원가입
|
||||
tags:
|
||||
- 회원가입
|
||||
/exam:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 응시 목록을 가져옵니다.
|
||||
parameters:
|
||||
- description: 검색어
|
||||
in: query
|
||||
name: q
|
||||
type: string
|
||||
- description: 페이지
|
||||
in: query
|
||||
name: page
|
||||
type: integer
|
||||
- description: 페이지 사이즈
|
||||
in: query
|
||||
name: limit
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamListResponse'
|
||||
summary: 응시 목록 가져오기
|
||||
tags:
|
||||
- Exam
|
||||
patch:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 퀴즈 프로그램 정보를 변경합니다.
|
||||
parameters:
|
||||
- description: Exam Patch Body (변경할 필드만 입력)
|
||||
in: body
|
||||
name: examPatchBody
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamPatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse'
|
||||
summary: 퀴즈 프로그램 정보 변경
|
||||
tags:
|
||||
- Exam
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 응시 매칭을 만듭니다.
|
||||
parameters:
|
||||
- description: Exam Body
|
||||
in: body
|
||||
name: examBody
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse'
|
||||
summary: 응시 매칭 생성
|
||||
tags:
|
||||
- Exam
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 퀴즈 프로그램을 수정합니다.
|
||||
parameters:
|
||||
- description: Exam Update Body
|
||||
in: body
|
||||
name: examUpdateBody
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamUpdateRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse'
|
||||
summary: 퀴즈 프로그램 수정
|
||||
tags:
|
||||
- Exam
|
||||
/exam/{id}:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: ID로 응시 정보를 가져옵니다.
|
||||
parameters:
|
||||
- description: 응시 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ExamResponse'
|
||||
summary: 응시(시험) 정보 가져오기
|
||||
tags:
|
||||
- Exam
|
||||
/program:
|
||||
get:
|
||||
consumes:
|
||||
@ -317,44 +619,12 @@ paths:
|
||||
- application/json
|
||||
description: 퀴즈 프로그램을 만듭니다.
|
||||
parameters:
|
||||
- description: 프로그램 제목
|
||||
- description: Program Body
|
||||
in: body
|
||||
name: subject
|
||||
name: programBody
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 코스
|
||||
in: body
|
||||
name: course
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 내용
|
||||
in: body
|
||||
name: content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 태그
|
||||
in: body
|
||||
name: tag
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- description: 프로그램 상태 on 또는 off
|
||||
in: body
|
||||
name: status
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 발행 날짜
|
||||
in: body
|
||||
name: publish_at
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ProgramRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@ -370,44 +640,12 @@ paths:
|
||||
- application/json
|
||||
description: 퀴즈 프로그램을 수정합니다.
|
||||
parameters:
|
||||
- description: 프로그램 제목
|
||||
- description: Program Body
|
||||
in: body
|
||||
name: subject
|
||||
name: programUpdateBody
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 코스
|
||||
in: body
|
||||
name: course
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 내용
|
||||
in: body
|
||||
name: content
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 태그
|
||||
in: body
|
||||
name: tag
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- description: 프로그램 상태 on 또는 off
|
||||
in: body
|
||||
name: status
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 프로그램 발행 날짜
|
||||
in: body
|
||||
name: publish_at
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.ProgramRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@ -477,58 +715,12 @@ paths:
|
||||
- application/json
|
||||
description: 퀴즈를 만듭니다.
|
||||
parameters:
|
||||
- description: 프로그램 ID
|
||||
- description: Quiz Body
|
||||
in: body
|
||||
name: program_id
|
||||
name: quizBody
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 퀴즈 순서
|
||||
in: body
|
||||
name: sequence
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: '퀴즈 타입 : choice, check, ox, input'
|
||||
in: body
|
||||
name: quiz_type
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 퀴즈 문제
|
||||
in: body
|
||||
name: question
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: '퀴즈 선택지 : [''선택1'',''선택2'',''선택3'', ''선택4'']'
|
||||
in: body
|
||||
name: choice
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- description: '퀴즈 정답 : [1,3]'
|
||||
in: body
|
||||
name: answer
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- description: 퀴즈 힌트
|
||||
in: body
|
||||
name: hint
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 퀴즈 해설
|
||||
in: body
|
||||
name: comment
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.QuizRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@ -544,63 +736,12 @@ paths:
|
||||
- application/json
|
||||
description: 퀴즈를 수정합니다.
|
||||
parameters:
|
||||
- description: 퀴즈 ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: 프로그램 ID
|
||||
- description: Quiz Body
|
||||
in: body
|
||||
name: program_id
|
||||
name: quizBody
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 퀴즈 순서
|
||||
in: body
|
||||
name: sequence
|
||||
required: true
|
||||
schema:
|
||||
type: integer
|
||||
- description: '퀴즈 타입 : choice, check, ox, input'
|
||||
in: body
|
||||
name: quiz_type
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 퀴즈 문제
|
||||
in: body
|
||||
name: question
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: '퀴즈 선택지 : [''선택1'',''선택2'',''선택3'', ''선택4'']'
|
||||
in: body
|
||||
name: choice
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- description: '퀴즈 정답 : [1,3]'
|
||||
in: body
|
||||
name: answer
|
||||
required: true
|
||||
schema:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
- description: 퀴즈 힌트
|
||||
in: body
|
||||
name: hint
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- description: 퀴즈 해설
|
||||
in: body
|
||||
name: comment
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
$ref: '#/definitions/learnsteam_learsteam-quiz-api_internal_models.QuizRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
|
Reference in New Issue
Block a user