{ "consumes": [ "application/json" ], "produces": [ "application/json" ], "schemes": [ "http" ], "swagger": "2.0", "info": { "description": "Quizz-app", "version": "0.0.1-alpha" }, "host": "127.0.0.1", "basePath": "/api", "paths": { "/healthz": { "get": { "description": "Overall health check", "produces": [ "application/json" ], "tags": [ "Healthcheck" ], "summary": "Overall health check", "operationId": "overallHealthCheck", "responses": { "200": { "$ref": "#/responses/GenericResOk" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/healthz/db": { "get": { "description": "Database health check", "produces": [ "application/json" ], "tags": [ "Healthcheck" ], "summary": "Database health check", "operationId": "dbHealthCheck", "responses": { "200": { "$ref": "#/responses/GenericResOk" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/metrics": { "get": { "description": "Prometheus metrics endpoint", "produces": [ "text/plain" ], "tags": [ "Metrics" ], "summary": "Prometheus metrics endpoint", "operationId": "ReqMetrics" } }, "/v1/admin/reports/list": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Reports" ], "summary": "Get details of quizzes list host by Admin.", "operationId": "RequestListQuizzesAnalysis", "parameters": [ { "type": "string", "x-go-name": "OrderBy", "name": "orderBy", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/RsponseListQuizzesAnalysis" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/admin/reports/{active_quiz_id}/analysis": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Reports" ], "summary": "Get details of quizzes host by Admin.", "operationId": "RequestGetQuizAnalysis", "parameters": [ { "type": "string", "x-go-name": "ActiveQuizId", "name": "active_quiz_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseGetQuizAnalysis" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/analytics_board/admin": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "AnalyticsBoard" ], "summary": "Get a analyticsboard details for admin.", "operationId": "RequestAnalyticsBoardForAdmin", "parameters": [ { "type": "string", "x-go-name": "ActiveQuizId", "name": "active_quiz_id", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseAnalyticsBoardForAdmin" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/analytics_board/user": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "AnalyticsBoard" ], "summary": "Get a analyticsboard details for user.", "operationId": "RequestAnalyticsBoardForUser", "parameters": [ { "type": "string", "x-go-name": "UserPlayedQuiz", "name": "user_played_quiz", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseAnalyticsBoardForUser" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/final_score/admin": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "FinalScore" ], "summary": "Get a finalScore details for admin.", "operationId": "RequestFinalScoreForAdmin", "parameters": [ { "type": "string", "x-go-name": "ActiveQuizId", "name": "active_quiz_id", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseFinalScoreForAdmin" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/final_score/user": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "FinalScore" ], "summary": "Get a finalScore details for user.", "operationId": "RequestFinalScoreForUser", "parameters": [ { "type": "string", "x-go-name": "UserPlayedQuiz", "name": "user_played_quiz", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseFinalScoreForUser" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/images": { "post": { "consumes": [ "multipart/form-data" ], "schemes": [ "http", "https" ], "tags": [ "FileUpload" ], "summary": "Insert image in s3 bucket.", "operationId": "RequestInsertImage", "parameters": [ { "type": "string", "x-go-name": "QuizId", "name": "quiz_id", "in": "query", "required": true }, { "type": "file", "x-go-name": "File", "name": "image-attachment", "in": "formData", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseInsertImage" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/kratos/auth": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Auth" ], "summary": "Authenticate user with kratos session id.", "operationId": "DoKratosAuth", "responses": { "400": { "$ref": "#/responses/GenericResFailBadRequest" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/kratos/user": { "put": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "User" ], "summary": "Update user Details.", "operationId": "RequestUpadateRegisteredUser", "parameters": [ { "name": "Body", "in": "body", "required": true, "schema": { "type": "object", "properties": { "email": { "type": "string", "x-go-name": "Email" }, "first_name": { "type": "string", "x-go-name": "FirstName" }, "last_name": { "type": "string", "x-go-name": "LastName" } } } } ], "responses": { "200": { "$ref": "#/responses/ResponseUserDetails" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } }, "delete": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "User" ], "summary": "Delete user Details and all its related data.", "operationId": "DeleteRegisteredUser", "responses": { "200": { "$ref": "#/responses/ResponseOkWithMessage" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/kratos/whoami": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "User" ], "summary": "Get Details of Register user.", "operationId": "GetRegisteredUser", "responses": { "200": { "$ref": "#/responses/ResponseGetRegisteredUser" }, "401": { "$ref": "#/responses/GenericResFailConflict" } } } }, "/v1/quizzes": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Quiz" ], "summary": "Get details of quizzes uploaded by Admin.", "operationId": "GetAdminUploadedQuizzes", "responses": { "200": { "$ref": "#/responses/ResponseAdminUploadedQuiz" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/quizzes/{quiz_id}": { "delete": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Quiz" ], "summary": "Delete quiz that created by user (if no active quiz is present).", "operationId": "DeleteQuizById", "responses": { "200": { "$ref": "#/responses/ResponseOkWithMessage" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/quizzes/{quiz_id}/demo_session": { "post": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Quiz" ], "summary": "Create quiz active for user.", "operationId": "RequestGenerateDemoSession", "parameters": [ { "type": "string", "x-go-name": "QuizId", "name": "quiz_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseGenerateDemoSession" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/quizzes/{quiz_id}/questions": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Question" ], "summary": "List all questions of quiz with `is_active_quiz_present` and `quiz_played_count`.", "operationId": "RequestListQuestionByQuizId", "parameters": [ { "type": "string", "x-go-name": "QuizId", "name": "quiz_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseListQuestionByQuizId" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/quizzes/{quiz_id}/questions/{question_id}": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Question" ], "summary": "Get question and thier options with answer.", "operationId": "RequestGetQuestionById", "parameters": [ { "type": "string", "x-go-name": "QuizId", "name": "quiz_id", "in": "path", "required": true }, { "type": "string", "x-go-name": "QuestionId", "name": "question_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseGetQuestionById" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } }, "put": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Question" ], "summary": "Update question and thier options with answer.", "operationId": "RequestUpdateQuestionById", "parameters": [ { "type": "string", "x-go-name": "QuizId", "name": "quiz_id", "in": "path", "required": true }, { "type": "string", "x-go-name": "QuestionId", "name": "question_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseOkWithMessage" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } }, "delete": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "Question" ], "summary": "Delete question only if no active quiz is present.", "operationId": "RequestDeleteQuestionById", "parameters": [ { "type": "string", "x-go-name": "QuizId", "name": "quiz_id", "in": "path", "required": true }, { "type": "string", "x-go-name": "QuestionId", "name": "question_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseOkWithMessage" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/quizzes/{quiz_title}/upload": { "post": { "consumes": [ "multipart/form-data" ], "schemes": [ "http", "https" ], "tags": [ "Quiz" ], "summary": "Create a new quiz by uploading a CSV file.", "operationId": "RequestQuizCreated", "parameters": [ { "type": "string", "x-go-name": "QuizTitle", "name": "quiz_title", "in": "path", "required": true }, { "type": "file", "x-go-name": "File", "name": "attachment", "in": "formData", "required": true }, { "type": "string", "x-go-name": "Description", "name": "description", "in": "formData" } ], "responses": { "200": { "$ref": "#/responses/ResponseQuizCreated" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/user/who": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "User" ], "summary": "Get Details of user.", "operationId": "GetUserMeta", "responses": { "200": { "$ref": "#/responses/ResponseUserDetails" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/user/{username}": { "post": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "User" ], "summary": "Create Guest user to play for quiz directly without login.", "operationId": "RequestCreateQuickUser", "parameters": [ { "type": "string", "x-go-name": "Username", "name": "username", "in": "path", "required": true }, { "type": "string", "x-go-name": "Avatar", "name": "avatar_name", "in": "query", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseUserDetails" }, "400": { "$ref": "#/responses/GenericResFailNotFound" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/user_played_quizes": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "UserPlayedQuiz" ], "summary": "List played quiz by user.", "operationId": "UserPlayedQuiz", "responses": { "200": { "$ref": "#/responses/ResponseListUserPlayedQuizes" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/user_played_quizes/{invitationCode}": { "post": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "UserPlayedQuiz" ], "summary": "Validate the code and copy the questions in reponses for user.", "operationId": "RequestPlayedQuizValidation", "parameters": [ { "type": "string", "x-go-name": "InvitationCode", "name": "invitationCode", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponsePlayedQuizValidation" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } }, "/v1/user_played_quizes/{user_played_quiz_id}": { "get": { "consumes": [ "application/json" ], "schemes": [ "http", "https" ], "tags": [ "UserPlayedQuiz" ], "summary": "Analysis of played quiz by user.", "operationId": "RequestListUserPlayedQuizesWithQuestionById", "parameters": [ { "type": "string", "x-go-name": "UserPlayedQuizId", "name": "user_played_quiz_id", "in": "path", "required": true } ], "responses": { "200": { "$ref": "#/responses/ResponseListUserPlayedQuizesWithQuestionById" }, "401": { "$ref": "#/responses/GenericResFailConflict" }, "500": { "$ref": "#/responses/GenericResError" } } } } }, "definitions": { "NullString": { "description": "var s NullString\nerr := db.QueryRow(\"SELECT name FROM foo WHERE id=?\", id).Scan(\u0026s)\n...\nif s.Valid {\nuse s.String\n} else {\nNULL value\n}", "type": "object", "title": "NullString represents a string that may be null.\nNullString implements the Scanner interface so\nit can be used as a scan destination:", "properties": { "String": { "type": "string" }, "Valid": { "type": "boolean" } }, "x-go-package": "database/sql" }, "NullTime": { "description": "NullTime implements the Scanner interface so\nit can be used as a scan destination, similar to NullString.", "type": "object", "title": "NullTime represents a time.Time that may be null.", "properties": { "Time": { "type": "string", "format": "date-time" }, "Valid": { "type": "boolean" } }, "x-go-package": "database/sql" }, "QuestionAnalytics": { "type": "object", "properties": { "correct_answer": { "type": "string", "x-go-name": "CorrectAnswer" }, "duration_in_seconds": { "type": "integer", "format": "int64", "x-go-name": "DurationInSeconds" }, "options": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "options_media": { "type": "string", "x-go-name": "OptionsMedia" }, "points": { "type": "integer", "format": "int64", "x-go-name": "Points" }, "question": { "type": "string", "x-go-name": "Question" }, "question_id": { "type": "string", "x-go-name": "QuestionId" }, "question_media": { "type": "string", "x-go-name": "QuestionsMedia" }, "question_type": { "type": "string", "x-go-name": "QuestionType" }, "question_type_id": { "type": "integer", "format": "int64", "x-go-name": "QuestionTypeID" }, "raw_options": { "type": "array", "items": { "type": "integer", "format": "uint8" }, "x-go-name": "RawOptions" }, "resource": { "type": "string", "x-go-name": "Resource" } }, "x-go-package": "github.com/Improwised/quizz-app/api/pkg/structs" }, "UUID": { "description": "A UUID is a 128 bit (16 byte) Universal Unique IDentifier as defined in RFC\n4122.", "type": "array", "items": { "type": "integer", "format": "uint8" }, "x-go-package": "github.com/google/uuid" } }, "responses": { "GenericResError": { "description": "Unexpected error occurred", "schema": { "type": "object", "properties": { "data": { "type": "object", "x-go-name": "Data" }, "message": { "type": "string", "x-go-name": "Message" }, "status": { "type": "string", "enum": [ "error" ], "x-go-name": "Status" } } } }, "GenericResFailBadRequest": { "description": "Fail due to user invalid input", "schema": { "type": "object", "properties": { "data": { "type": "object", "x-go-name": "Data" }, "status": { "type": "string", "enum": [ "fail" ], "x-go-name": "Status" } } } }, "GenericResFailConflict": { "description": "Server understand request but refuse to authorize it", "schema": { "type": "object", "properties": { "data": { "type": "object", "x-go-name": "Data" }, "status": { "type": "string", "enum": [ "fail" ], "x-go-name": "Status" } } } }, "GenericResFailNotFound": { "description": "Fail due to resource not exists", "schema": { "type": "object", "properties": { "data": { "type": "object", "x-go-name": "Data" }, "status": { "type": "string", "enum": [ "fail" ], "x-go-name": "Status" } } } }, "GenericResFailUnprocessableEntity": { "description": "Fail due to server understand request but unable to process", "schema": { "type": "object", "properties": { "data": { "type": "object", "x-go-name": "Data" }, "status": { "type": "string", "enum": [ "fail" ], "x-go-name": "Status" } } } }, "GenericResOk": { "description": "Response is okay", "schema": { "type": "object", "properties": { "status": { "type": "string", "enum": [ "success" ], "x-go-name": "Status" } } } }, "ResForbiddenRequest": { "description": "Fail due to user invalid input", "schema": { "type": "object", "properties": { "data": { "type": "object", "x-go-name": "Data" }, "status": { "type": "string", "enum": [ "fail" ], "x-go-name": "Status" } } } }, "ResponseAdminUploadedQuiz": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "created_at": { "type": "string", "format": "date-time", "x-go-name": "CreatedAt" }, "creator_id": { "type": "string", "x-go-name": "CreatorID" }, "description": { "$ref": "#/definitions/NullString" }, "id": { "$ref": "#/definitions/UUID" }, "title": { "type": "string", "x-go-name": "Title" }, "total_questions": { "type": "integer", "format": "int64", "x-go-name": "TotalQuestions" }, "updated_at": { "type": "string", "format": "date-time", "x-go-name": "UpdatedAt" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseAnalyticsBoardForAdmin": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "calculated_points": { "type": "integer", "format": "int64", "x-go-name": "CalculatedPoints" }, "calculated_score": { "type": "integer", "format": "int64", "x-go-name": "CalculatedScore" }, "correct_answer": { "type": "string", "x-go-name": "CorrectAnswer" }, "firstname": { "type": "string", "x-go-name": "FirstName" }, "is_attend": { "type": "boolean", "x-go-name": "IsAttend" }, "options": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "options_media": { "type": "string", "x-go-name": "OptionsMedia" }, "order_no": { "type": "integer", "format": "int64", "x-go-name": "OrderNo" }, "points": { "type": "integer", "format": "int64", "x-go-name": "Points" }, "question": { "type": "string", "x-go-name": "Question" }, "question_media": { "type": "string", "x-go-name": "QuestionsMedia" }, "question_type": { "type": "string", "x-go-name": "QuestionType" }, "question_type_id": { "type": "integer", "format": "int64", "x-go-name": "QuestionTypeID" }, "raw_options": { "type": "array", "items": { "type": "integer", "format": "uint8" }, "x-go-name": "RawOptions" }, "resource": { "type": "string", "x-go-name": "Resource" }, "response_time": { "type": "integer", "format": "int64", "x-go-name": "ResponseTime" }, "selected_answer": { "$ref": "#/definitions/NullString" }, "username": { "type": "string", "x-go-name": "UserName" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseAnalyticsBoardForUser": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "calculated_points": { "type": "integer", "format": "int64", "x-go-name": "CalculatedPoints" }, "calculated_score": { "type": "integer", "format": "int64", "x-go-name": "CalculatedScore" }, "correct_answer": { "type": "string", "x-go-name": "CorrectAnswer" }, "firstname": { "type": "string", "x-go-name": "FirstName" }, "is_attend": { "type": "boolean", "x-go-name": "IsAttend" }, "options": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "options_media": { "type": "string", "x-go-name": "OptionsMedia" }, "order_no": { "type": "integer", "format": "int64", "x-go-name": "OrderNo" }, "points": { "type": "integer", "format": "int64", "x-go-name": "Points" }, "question": { "type": "string", "x-go-name": "Question" }, "question_media": { "type": "string", "x-go-name": "QuestionsMedia" }, "question_type": { "type": "string", "x-go-name": "QuestionType" }, "question_type_id": { "type": "integer", "format": "int64", "x-go-name": "QuestionTypeID" }, "raw_options": { "type": "array", "items": { "type": "integer", "format": "uint8" }, "x-go-name": "RawOptions" }, "resource": { "type": "string", "x-go-name": "Resource" }, "response_time": { "type": "integer", "format": "int64", "x-go-name": "ResponseTime" }, "selected_answer": { "$ref": "#/definitions/NullString" }, "username": { "type": "string", "x-go-name": "UserName" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseFinalScoreForAdmin": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "firstname": { "type": "string", "x-go-name": "FirstName" }, "img_key": { "type": "string", "x-go-name": "ImageKey" }, "rank": { "type": "integer", "format": "int64", "x-go-name": "Rank" }, "response_time": { "type": "integer", "format": "int64", "x-go-name": "ResponseTime" }, "score": { "type": "integer", "format": "int64", "x-go-name": "Score" }, "username": { "type": "string", "x-go-name": "UserName" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseFinalScoreForUser": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "firstname": { "type": "string", "x-go-name": "FirstName" }, "img_key": { "type": "string", "x-go-name": "ImageKey" }, "rank": { "type": "integer", "format": "int64", "x-go-name": "Rank" }, "response_time": { "type": "integer", "format": "int64", "x-go-name": "ResponseTime" }, "score": { "type": "integer", "format": "int64", "x-go-name": "Score" }, "username": { "type": "string", "x-go-name": "UserName" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseGenerateDemoSession": { "description": "", "schema": { "type": "object", "properties": { "quizId": { "type": "string", "x-go-name": "QuizId" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseGetQuestionById": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "correct_answer": { "type": "string", "x-go-name": "CorrectAnswer" }, "duration_in_seconds": { "type": "integer", "format": "int64", "x-go-name": "DurationInSeconds" }, "options": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "options_media": { "type": "string", "x-go-name": "OptionsMedia" }, "points": { "type": "integer", "format": "int64", "x-go-name": "Points" }, "question": { "type": "string", "x-go-name": "Question" }, "question_id": { "type": "string", "x-go-name": "QuestionId" }, "question_media": { "type": "string", "x-go-name": "QuestionsMedia" }, "question_type": { "type": "string", "x-go-name": "QuestionType" }, "question_type_id": { "type": "integer", "format": "int64", "x-go-name": "QuestionTypeID" }, "raw_options": { "type": "array", "items": { "type": "integer", "format": "uint8" }, "x-go-name": "RawOptions" }, "resource": { "type": "string", "x-go-name": "Resource" } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseGetQuizAnalysis": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "avg_response_time": { "type": "number", "format": "float", "x-go-name": "AvgResponseTime" }, "correct_answer": { "type": "array", "items": { "type": "integer", "format": "int64" }, "x-go-name": "CorrectAnswers" }, "duration": { "type": "integer", "format": "int64", "x-go-name": "DurationInSeconds" }, "options": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "options_media": { "type": "string", "x-go-name": "OptionsMedia" }, "question": { "type": "string", "x-go-name": "Question" }, "question_id": { "$ref": "#/definitions/UUID" }, "question_media": { "type": "string", "x-go-name": "QuestionsMedia" }, "resource": { "type": "string", "x-go-name": "Resource" }, "selected_answers": { "type": "object", "additionalProperties": { "type": "object" }, "x-go-name": "SelectedAnswers" }, "type": { "type": "integer", "format": "int64", "x-go-name": "Type" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseGetRegisteredUser": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "identity": { "type": "object", "x-go-name": "Identity" } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseInsertImage": { "description": "", "schema": { "type": "object", "properties": { "message": { "type": "string", "x-go-name": "Message" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseListQuestionByQuizId": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/QuestionAnalytics" }, "x-go-name": "Data" }, "is_active_quiz_present": { "type": "boolean", "x-go-name": "IsActiveQuizPresent" }, "quiz_played_count": { "type": "integer", "format": "int64", "x-go-name": "QuizPlayedCount" } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseListUserPlayedQuizesWithQuestionById": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "calculated_points": { "type": "integer", "format": "int64", "x-go-name": "CalculatedPoints" }, "calculated_score": { "type": "integer", "format": "int64", "x-go-name": "CalculatedScore" }, "correct_answer": { "type": "string", "x-go-name": "CorrectAnswer" }, "is_attend": { "type": "boolean", "x-go-name": "IsAttend" }, "options": { "type": "object", "additionalProperties": { "type": "string" }, "x-go-name": "Options" }, "options_media": { "type": "string", "x-go-name": "OptionsMedia" }, "points": { "type": "integer", "format": "int64", "x-go-name": "Points" }, "question": { "type": "string", "x-go-name": "Question" }, "question_media": { "type": "string", "x-go-name": "QuestionsMedia" }, "question_type": { "type": "string", "x-go-name": "QuestionType" }, "question_type_id": { "type": "integer", "format": "int64", "x-go-name": "QuestionTypeID" }, "raw_options": { "type": "array", "items": { "type": "integer", "format": "uint8" }, "x-go-name": "RawOptions" }, "resource": { "type": "string", "x-go-name": "Resource" }, "response_time": { "type": "integer", "format": "int64", "x-go-name": "ResponseTime" }, "selected_answer": { "$ref": "#/definitions/NullString" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseOkWithMessage": { "description": "", "schema": { "type": "object", "properties": { "message": { "type": "string", "x-go-name": "Message" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponsePlayedQuizValidation": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "session_id": { "type": "string", "x-go-name": "SessionId" }, "user_played_quiz": { "type": "string", "x-go-name": "UserPlayedQuizId" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseQuizCreated": { "description": "", "schema": { "type": "object", "properties": { "quizId": { "type": "string", "x-go-name": "QuizId" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "ResponseUserDetails": { "description": "", "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "created_at": { "type": "string", "x-go-name": "CreatedAt" }, "email": { "type": "string", "x-go-name": "Email" }, "first_name": { "type": "string", "x-go-name": "FirstName" }, "id": { "type": "string", "x-go-name": "ID" }, "img_key": { "type": "string", "x-go-name": "ImageKey" }, "kratos_id": { "$ref": "#/definitions/NullString" }, "last_name": { "type": "string", "x-go-name": "LastName" }, "roles": { "type": "string", "x-go-name": "Roles" }, "updated_at": { "type": "string", "x-go-name": "UpdatedAt" }, "username": { "type": "string", "x-go-name": "Username" } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } }, "RsponseListQuizzesAnalysis": { "description": "", "schema": { "type": "object", "properties": { "count": { "type": "integer", "format": "int64", "x-go-name": "Count" }, "data": { "type": "array", "items": { "type": "object", "properties": { "activated_from": { "$ref": "#/definitions/NullTime" }, "activated_to": { "$ref": "#/definitions/NullTime" }, "correct_answers": { "type": "integer", "format": "int64", "x-go-name": "CorrectAnswers" }, "description": { "$ref": "#/definitions/NullString" }, "id": { "$ref": "#/definitions/UUID" }, "participants": { "type": "integer", "format": "int64", "x-go-name": "Participants" }, "questions": { "type": "integer", "format": "int64", "x-go-name": "Questions" }, "title": { "type": "string", "x-go-name": "Title" } } }, "x-go-name": "Data" }, "status": { "type": "string", "x-go-name": "Status" } } } } } }