-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.json
More file actions
1 lines (1 loc) · 26.5 KB
/
docs.json
File metadata and controls
1 lines (1 loc) · 26.5 KB
1
{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_healthCheck","parameters":[],"responses":{"200":{"description":""}}}},"/api/users":{"get":{"operationId":"UsersController_findAllUsers","parameters":[{"name":"page","required":false,"in":"query","description":"Page number to retrieve.If you provide invalid value the default page number will applied\n <p>\n <b>Example: </b> 1\n </p>\n <p>\n <b>Default Value: </b> 1\n </p>\n ","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of records per page.\n <p>\n <b>Example: </b> 20\n </p>\n <p>\n <b>Default Value: </b> 15\n </p>\n <p>\n <b>Max Value: </b> 100\n </p>\n\n If provided value is greater than max value, max value will be applied.\n ","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Parameter to sort by.\n <p>To sort by multiple fields, just provide query param multiple types. The order in url defines an order of sorting</p>\n <p>\n <b>Format: </b> fieldName:DIRECTION\n </p>\n <p>\n <b>Example: </b> sortBy=id:DESC&sortBy=createdAt:ASC\n </p>\n <p>\n <b>Default Value: </b> username:ASC\n </p>\n <h4>Available Fields</h4><ul><li>id</li>\n<li>username</li>\n<li>role</li></ul>\n ","schema":{"type":"array","items":{"type":"string","enum":["id:ASC","id:DESC","username:ASC","username:DESC","role:ASC","role:DESC"]}}},{"name":"search","required":false,"in":"query","description":"Search term to filter result values\n <p>\n <b>Example: </b> John\n </p>\n <p>\n <b>Default Value: </b> No default value\n </p>\n ","schema":{"type":"string"}},{"name":"searchBy","required":false,"in":"query","description":"List of fields to search by term to filter result values\n <p>\n <b>Example: </b> username\n </p>\n <p>\n <b>Default Value: </b> By default all fields mentioned below will be used to search by term\n </p>\n <h4>Available Fields</h4><ul><li>username</li></ul>\n ","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedDocumented"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/UserDto"}},"meta":{"properties":{"select":{"type":"array","items":{"type":"string"}},"filter":{"type":"object","properties":{}}}}}}]}}}}},"tags":["users"]}},"/api/users/{id}":{"get":{"operationId":"UsersController_findOneUser","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Contains found user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["users"]}},"/api/users/{id}/statistic":{"get":{"operationId":"UsersController_getUserStatistic","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Contains found user with statistic information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatisticDto"}}}}},"tags":["users"]}},"/api/me":{"get":{"operationId":"MeController_getProfile","parameters":[],"responses":{"200":{"description":"Contains found user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["me"],"security":[{"cookie":[]}]},"patch":{"operationId":"MeController_updateProfile","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserDto"}}}},"responses":{"200":{"description":"Contains amount of updated users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponseDto"}}}}},"tags":["me"],"security":[{"cookie":[]}]},"delete":{"operationId":"MeController_deleteProfile","parameters":[],"responses":{"200":{"description":"Contains deleted user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["me"],"security":[{"cookie":[]}]}},"/api/me/password":{"patch":{"operationId":"MeController_changePassword","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordDto"}}}},"responses":{"200":{"description":"Contains amount of updated users","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponseDto"}}}}},"tags":["me"],"security":[{"cookie":[]}]}},"/api/snippets":{"get":{"operationId":"SnippetsController_findAllSnippets","parameters":[{"name":"userId","required":false,"in":"query","description":"Id of the snippet owner","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page number to retrieve.If you provide invalid value the default page number will applied\n <p>\n <b>Example: </b> 1\n </p>\n <p>\n <b>Default Value: </b> 1\n </p>\n ","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of records per page.\n <p>\n <b>Example: </b> 20\n </p>\n <p>\n <b>Default Value: </b> 15\n </p>\n <p>\n <b>Max Value: </b> 100\n </p>\n\n If provided value is greater than max value, max value will be applied.\n ","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Parameter to sort by.\n <p>To sort by multiple fields, just provide query param multiple types. The order in url defines an order of sorting</p>\n <p>\n <b>Format: </b> fieldName:DIRECTION\n </p>\n <p>\n <b>Example: </b> sortBy=id:DESC&sortBy=createdAt:ASC\n </p>\n <p>\n <b>Default Value: </b> id:ASC\n </p>\n <h4>Available Fields</h4><ul><li>id</li>\n<li>code</li>\n<li>language</li></ul>\n ","schema":{"type":"array","items":{"type":"string","enum":["id:ASC","id:DESC","code:ASC","code:DESC","language:ASC","language:DESC"]}}},{"name":"search","required":false,"in":"query","description":"Search term to filter result values\n <p>\n <b>Example: </b> John\n </p>\n <p>\n <b>Default Value: </b> No default value\n </p>\n ","schema":{"type":"string"}},{"name":"searchBy","required":false,"in":"query","description":"List of fields to search by term to filter result values\n <p>\n <b>Example: </b> code,language\n </p>\n <p>\n <b>Default Value: </b> By default all fields mentioned below will be used to search by term\n </p>\n <h4>Available Fields</h4><ul><li>code</li>\n<li>language</li></ul>\n ","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedDocumented"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/SnippetDto"}},"meta":{"properties":{"select":{"type":"array","items":{"type":"string"}},"filter":{"type":"object","properties":{}}}}}}]}}}}},"tags":["snippets"]},"post":{"operationId":"SnippetsController_createSnippet","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSnippetDto"}}}},"responses":{"201":{"description":"Contains created snippet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnippetDto"}}}}},"tags":["snippets"],"security":[{"cookie":[]}]}},"/api/snippets/languages":{"get":{"operationId":"SnippetsController_getLanguages","parameters":[],"responses":{"200":{"description":"Contains supported languages","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}}},"tags":["snippets"],"security":[{"cookie":[]}]}},"/api/snippets/{id}":{"get":{"operationId":"SnippetsController_findOneSnippet","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Contains found snippet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnippetDto"}}}}},"tags":["snippets"]},"patch":{"operationId":"SnippetsController_updateSnippet","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSnippetDto"}}}},"responses":{"200":{"description":"Contains count of updated snippets","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponseDto"}}}}},"tags":["snippets"],"security":[{"cookie":[]}]},"delete":{"operationId":"SnippetsController_delete","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Contains deleted snippet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SnippetDto"}}}}},"tags":["snippets"],"security":[{"cookie":[]}]}},"/api/snippets/{id}/mark":{"post":{"operationId":"SnippetsController_markSnippet","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkSnippetDto"}}}},"responses":{"200":{"description":"Contains new user mark for the snippet","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkSnippetDto"}}}}},"tags":["snippets"],"security":[{"cookie":[]}]}},"/api/comments":{"post":{"operationId":"CommentsController_createComment","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentDto"}}}},"responses":{"201":{"description":"Contains created comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentDto"}}}}},"tags":["comments"],"security":[{"cookie":[]}]}},"/api/comments/{id}":{"patch":{"operationId":"CommentsController_updateComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentDto"}}}},"responses":{"200":{"description":"Contains amount of updated comments","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateResponseDto"}}}}},"tags":["comments"],"security":[{"cookie":[]}]},"delete":{"operationId":"CommentsController_deleteComment","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Contains deleted comment","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentDto"}}}}},"tags":["comments"],"security":[{"cookie":[]}]}},"/api/auth":{"get":{"operationId":"AuthController_getAuth","parameters":[],"responses":{"200":{"description":"Contains authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["auth"]}},"/api/auth/login":{"post":{"operationId":"AuthController_login","parameters":[],"requestBody":{"required":true,"description":"User credentials","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsDto"}}}},"responses":{"200":{"description":"Contains authenticated user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["auth"]}},"/api/auth/logout":{"post":{"operationId":"AuthController_logout","parameters":[],"responses":{"200":{"description":""}},"tags":["auth"],"security":[{"cookie":[]}]}},"/api/register":{"post":{"operationId":"RegisterController_registerUser","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialsDto"}}}},"responses":{"201":{"description":"Contains information about registred user","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserDto"}}}}},"tags":["register"]}},"/api/questions":{"get":{"operationId":"QuestionsController_getQuestions","parameters":[{"name":"page","required":false,"in":"query","description":"Page number to retrieve.If you provide invalid value the default page number will applied\n <p>\n <b>Example: </b> 1\n </p>\n <p>\n <b>Default Value: </b> 1\n </p>\n ","schema":{"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Number of records per page.\n <p>\n <b>Example: </b> 20\n </p>\n <p>\n <b>Default Value: </b> 15\n </p>\n <p>\n <b>Max Value: </b> 100\n </p>\n\n If provided value is greater than max value, max value will be applied.\n ","schema":{"type":"number"}},{"name":"sortBy","required":false,"in":"query","description":"Parameter to sort by.\n <p>To sort by multiple fields, just provide query param multiple types. The order in url defines an order of sorting</p>\n <p>\n <b>Format: </b> fieldName:DIRECTION\n </p>\n <p>\n <b>Example: </b> sortBy=id:DESC&sortBy=createdAt:ASC\n </p>\n <p>\n <b>Default Value: </b> title:DESC\n </p>\n <h4>Available Fields</h4><ul><li>id</li>\n<li>title</li>\n<li>description</li>\n<li>attachedCode</li></ul>\n ","schema":{"type":"array","items":{"type":"string","enum":["id:ASC","id:DESC","title:ASC","title:DESC","description:ASC","description:DESC","attachedCode:ASC","attachedCode:DESC"]}}},{"name":"search","required":false,"in":"query","description":"Search term to filter result values\n <p>\n <b>Example: </b> John\n </p>\n <p>\n <b>Default Value: </b> No default value\n </p>\n ","schema":{"type":"string"}},{"name":"searchBy","required":false,"in":"query","description":"List of fields to search by term to filter result values\n <p>\n <b>Example: </b> title,description,attachedCode\n </p>\n <p>\n <b>Default Value: </b> By default all fields mentioned below will be used to search by term\n </p>\n <h4>Available Fields</h4><ul><li>title</li>\n<li>description</li>\n<li>attachedCode</li></ul>\n ","schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PaginatedDocumented"},{"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/QuestionWithStatusDto"}},"meta":{"properties":{"select":{"type":"array","items":{"type":"string"}},"filter":{"type":"object","properties":{}}}}}}]}}}}},"tags":["questions"]},"post":{"operationId":"QuestionsController_createQuestion","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuestionDto"}}}},"responses":{"201":{"description":"Returns created question","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateQuestionDto"}}}}},"tags":["questions"],"security":[{"cookie":[]}]}},"/api/questions/{id}":{"get":{"operationId":"QuestionsController_getQuestion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Returns single question by id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionWithStatusDto"}}}}},"tags":["questions"]},"patch":{"operationId":"QuestionsController_updateQuestion","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuestionDto"}}}},"responses":{"201":{"description":"Updates question","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionDto"}}}}},"tags":["questions"],"security":[{"cookie":[]}]},"delete":{"operationId":"QuestionsController_deleteQuestion","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Deletes question","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionDto"}}}}},"tags":["questions"],"security":[{"cookie":[]}]}},"/api/answers":{"get":{"operationId":"AnswersController_getAnswers","parameters":[],"responses":{"200":{"description":"Returns all answers"}},"tags":["answers"]},"post":{"operationId":"AnswersController_createAnswer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAnswerDto"}}}},"responses":{"201":{"description":"Returns created answer"}},"tags":["answers"],"security":[{"cookie":[]}]}},"/api/answers/{id}/state/{state}":{"put":{"operationId":"AnswersController_updateState","parameters":[{"name":"state","required":true,"in":"path","examples":{"correct":{"value":"correct","description":"Pass if you want to mark answer as correct","summary":"Pass if you want to mark answer as correct"},"incorrect":{"value":"incorrect","description":"Pass if you want to mark answer as incorrect","summary":"Pass if you want to mark answer as incorrect"}},"schema":{"$ref":"#/components/schemas/AnswerState"}},{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Updates correct/incorrect state of answer"}},"tags":["answers"],"security":[{"cookie":[]}]}},"/api/answers/{id}":{"patch":{"operationId":"AnswersController_updateAnswer","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAnswerDto"}}}},"responses":{"200":{"description":"Updates answer content"}},"tags":["answers"],"security":[{"cookie":[]}]},"delete":{"operationId":"AnswersController_deleteAnswer","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"Deletes answer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerDto"}}}}},"tags":["answers"],"security":[{"cookie":[]}]}}},"info":{"title":"Codelang API","description":"The Codelang API description","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"cookie":{"type":"apiKey","in":"cookie","name":"token"}},"schemas":{"PaginatedMetaDocumented":{"type":"object","properties":{"itemsPerPage":{"type":"number","title":"Number of items per page"},"totalItems":{"type":"number","title":"Total number of items"},"currentPage":{"type":"number","title":"Current requested page"},"totalPages":{"type":"number","title":"Total number of pages"},"sortBy":{"type":"array","title":"Sorting by columns","items":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["ASC","DESC"]}]}}},"searchBy":{"title":"Search by fields","type":"array","items":{"type":"string"}},"search":{"type":"string","title":"Search term"},"select":{"title":"List of selected fields","type":"array","items":{"type":"string"}},"filter":{"type":"object","title":"Filters that applied to the query"}},"required":["itemsPerPage","totalItems","currentPage","totalPages"]},"PaginatedLinksDocumented":{"type":"object","properties":{"first":{"type":"string","title":"Link to first page"},"previous":{"type":"string","title":"Link to previous page"},"current":{"type":"string","title":"Link to current page"},"next":{"type":"string","title":"Link to next page"},"last":{"type":"string","title":"Link to last page"}}},"PaginatedDocumented":{"type":"object","properties":{"data":{"title":"Array of entities","type":"array","items":{"type":"object"}},"meta":{"title":"Pagination Metadata","allOf":[{"$ref":"#/components/schemas/PaginatedMetaDocumented"}]},"links":{"title":"Links to pages","allOf":[{"$ref":"#/components/schemas/PaginatedLinksDocumented"}]}},"required":["data","meta","links"]},"UserRoles":{"type":"string","description":"User's role","enum":["user","admin"]},"UserDto":{"type":"object","properties":{"id":{"type":"number","description":"User's identifier"},"username":{"type":"string","description":"User's nickname"},"role":{"$ref":"#/components/schemas/UserRoles"}},"required":["id","username","role"]},"StatisticDto":{"type":"object","properties":{"snippetsCount":{"type":"number","description":"Number of snippets created by user","example":5},"rating":{"type":"number","description":"User activity rating","example":150},"commentsCount":{"type":"number","description":"Number of comments made by user","example":10},"likesCount":{"type":"number","description":"Number of likes given by user","example":20},"dislikesCount":{"type":"number","description":"Number of dislikes given by user","example":5},"questionsCount":{"type":"number","description":"Number of questions asked by user","example":8},"correctAnswersCount":{"type":"number","description":"Number of correct answers given by user","example":12},"regularAnswersCount":{"type":"number","description":"Number of regular answers given by user","example":15}},"required":["snippetsCount","rating","commentsCount","likesCount","dislikesCount","questionsCount","correctAnswersCount","regularAnswersCount"]},"UserStatisticDto":{"type":"object","properties":{"id":{"type":"number","description":"User's identifier"},"username":{"type":"string","description":"User's nickname"},"role":{"$ref":"#/components/schemas/UserRoles"},"statistic":{"description":"User activity statistics","allOf":[{"$ref":"#/components/schemas/StatisticDto"}]}},"required":["id","username","role","statistic"]},"UpdateUserDto":{"type":"object","properties":{"username":{"type":"string","description":"New user nickname","minLength":5}},"required":["username"]},"UpdateResponseDto":{"type":"object","properties":{"updatedCount":{"type":"number","description":"Amount of updated items"}},"required":["updatedCount"]},"ChangePasswordDto":{"type":"object","properties":{"oldPassword":{"type":"string","description":"Old user's password"},"newPassword":{"type":"string","description":"New password"}},"required":["oldPassword","newPassword"]},"SnippetDto":{"type":"object","properties":{"id":{"type":"number","description":"Snippet's identifier"},"language":{"type":"string","description":"Snippet's programming language"},"code":{"type":"string","description":"Snippet's content"},"user":{"description":"Owner of the snippet","allOf":[{"$ref":"#/components/schemas/UserDto"}]}},"required":["id","language","code","user"]},"Languages":{"type":"string","description":"Snippet's language (programming language)","enum":["JavaScript","Python","Java","C/C++","C#","Go","Kotlin","Ruby"]},"CreateSnippetDto":{"type":"object","properties":{"code":{"$ref":"#/components/schemas/Languages"},"language":{"type":"string","description":"Snippet's language (programming language)"}},"required":["code","language"]},"UpdateSnippetDto":{"type":"object","properties":{"code":{"type":"string","description":"New snippet content"},"language":{"type":"string","description":"New snippet language"}}},"SnippetMark":{"type":"string","description":"User mark for the snippet. like, dislike or none (remove any existing mark: like or dislike)","enum":["like","dislike","none"]},"MarkSnippetDto":{"type":"object","properties":{"mark":{"$ref":"#/components/schemas/SnippetMark"}},"required":["mark"]},"CreateCommentDto":{"type":"object","properties":{"content":{"type":"string","description":"Comment's content"},"snippetId":{"type":"number","description":"Id of the commenting snippet"}},"required":["content","snippetId"]},"CommentDto":{"type":"object","properties":{"id":{"type":"number","description":"Comment's identifier"},"content":{"type":"string","description":"Comment's content"},"user":{"description":"Owner of the comment","allOf":[{"$ref":"#/components/schemas/UserDto"}]}},"required":["id","content","user"]},"UpdateCommentDto":{"type":"object","properties":{"content":{"type":"string","description":"New comment content"}},"required":["content"]},"CredentialsDto":{"type":"object","properties":{"username":{"type":"string","description":"User's nickname","minLength":5},"password":{"type":"string","description":"User's password","minLength":6}},"required":["username","password"]},"QuestionWithStatusDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the question"},"title":{"type":"string","description":"Title of the question"},"description":{"type":"string","description":"Detailed description of the question"},"attachedCode":{"type":"string","description":"Code snippet attached to the question"},"user":{"type":"object","description":"User who created the question"},"answers":{"description":"List of answers to this question","type":"array","items":{"type":"array"}},"isResolved":{"type":"boolean","description":"Indicates if question is resolved"}},"required":["id","title","description","user","answers","isResolved"]},"CreateQuestionDto":{"type":"object","properties":{"title":{"type":"string","description":"Question title"},"description":{"type":"string","description":"Question description"},"attachedCode":{"type":"string","description":"Question attached code"}},"required":["title","description","attachedCode"]},"UpdateQuestionDto":{"type":"object","properties":{"title":{"type":"string","description":"Question description"},"description":{"type":"string","description":"Question description"},"attachedCode":{"type":"string","description":"Question attached code"}},"required":["title","description","attachedCode"]},"QuestionDto":{"type":"object","properties":{"id":{"type":"number","description":"Unique identifier of the question"},"title":{"type":"string","description":"Title of the question"},"description":{"type":"string","description":"Detailed description of the question"},"attachedCode":{"type":"string","description":"Code snippet attached to the question"},"user":{"type":"object","description":"User who created the question"},"answers":{"description":"List of answers to this question","type":"array","items":{"type":"array"}}},"required":["id","title","description","user","answers"]},"CreateAnswerDto":{"type":"object","properties":{"content":{"type":"string","description":"Answer content"},"questionId":{"type":"number","description":"Id of the commenting question"}},"required":["content","questionId"]},"AnswerState":{"type":"string","enum":["correct","incorrect"]},"UpdateAnswerDto":{"type":"object","properties":{"content":{"type":"string","description":"Answer content"}},"required":["content"]},"AnswerDto":{"type":"object","properties":{"id":{"type":"number","description":"The unique identifier of the answer","example":1},"content":{"type":"string","description":"The content of the answer","example":"Paris is the capital of France"},"isCorrect":{"type":"boolean","description":"Indicates whether this answer is correct","example":true}},"required":["id","content","isCorrect"]}}}}