diff --git a/docs/docs.go b/docs/docs.go index 74678c232c7ed71bfdf9f00f8a77e1fc1b14475c..c5b288afb7d4ebf65f01ea69ee105082f3eacb9d 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1,5 +1,4 @@ -// Code generated by swaggo/swag. DO NOT EDIT. - +// Code generated by swaggo/swag. DO NOT EDIT package docs import "github.com/swaggo/swag" @@ -2246,6 +2245,15 @@ const docTemplate = `{ "name": "id", "in": "path", "required": true + }, + { + "description": "Add Course payload", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/quiz.AddQuizRequestPayload" + } } ], "responses": { @@ -3121,6 +3129,28 @@ const docTemplate = `{ } } }, + "quiz.AddQuizRequestPayload": { + "description": "Information that should be available when you add a quiz", + "type": "object", + "required": [ + "course_id", + "name" + ], + "properties": { + "addQuizToken": { + "description": "Web Token that was appended to the link", + "type": "string" + }, + "course_id": { + "description": "Course ID", + "type": "string" + }, + "name": { + "description": "Quiz Name", + "type": "string" + } + } + }, "quiz.AnswerOption": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index 7d7802bc413765ed1066d2f8d08270a03e5b116a..f3f2ef29c3d9a1582156765304d1ce443c097047 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -2237,6 +2237,15 @@ "name": "id", "in": "path", "required": true + }, + { + "description": "Add Course payload", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/quiz.AddQuizRequestPayload" + } } ], "responses": { @@ -3112,6 +3121,28 @@ } } }, + "quiz.AddQuizRequestPayload": { + "description": "Information that should be available when you add a quiz", + "type": "object", + "required": [ + "course_id", + "name" + ], + "properties": { + "addQuizToken": { + "description": "Web Token that was appended to the link", + "type": "string" + }, + "course_id": { + "description": "Course ID", + "type": "string" + }, + "name": { + "description": "Quiz Name", + "type": "string" + } + } + }, "quiz.AnswerOption": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index b39336da946758345aadf855e855615703b341ab..969534e24ffadab4aa54d3e304a57670f577cc4b 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -380,6 +380,22 @@ definitions: - lesson_id - order type: object + quiz.AddQuizRequestPayload: + description: Information that should be available when you add a quiz + properties: + addQuizToken: + description: Web Token that was appended to the link + type: string + course_id: + description: Course ID + type: string + name: + description: Quiz Name + type: string + required: + - course_id + - name + type: object quiz.AnswerOption: properties: answer: @@ -1997,6 +2013,12 @@ paths: name: id required: true type: string + - description: Add Course payload + in: body + name: data + required: true + schema: + $ref: '#/definitions/quiz.AddQuizRequestPayload' produces: - application/json responses: diff --git a/handler/quiz/new.go b/handler/quiz/new.go index ca9ce5ed0b1d32b4d8cab8f568ec5a24221bb175..2a9b65f2188116bc40925f62075dc27c2d2abc5e 100644 --- a/handler/quiz/new.go +++ b/handler/quiz/new.go @@ -17,6 +17,7 @@ import ( // @Produce json // @Accept json // @Param id path string true "Quiz id" Format(uuid) +// @Param data body quiz.AddQuizRequestPayload true "Add Quiz payload" // @Success 200 {object} web.BaseResponse // @Router /quiz [put] func (m QuizHandlerImpl) NewQuiz(w http.ResponseWriter, r *http.Request) {