Skip to content

Commit 7f2a4b5

Browse files
committed
chore: update api docs
1 parent ed4682f commit 7f2a4b5

17 files changed

+134
-17
lines changed

api-docs/.openapi-generator/FILES

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Models/AnswerDetails.md
1212
Models/AuthToken.md
1313
Models/CodeExecution.md
1414
Models/DifficultyLevel.md
15+
Models/DifficultyLevelRequestDto.md
1516
Models/Error.md
1617
Models/ErrorResponseObject.md
1718
Models/ExecutionResult.md
@@ -21,6 +22,7 @@ Models/NewQuestion.md
2122
Models/NewTag.md
2223
Models/Profile.md
2324
Models/QuestionDetails.md
25+
Models/QuestionRateResponseDto.md
2426
Models/QuestionSummary.md
2527
Models/SuccessResponseObject.md
2628
Models/SuccessResponseObject_data.md
@@ -39,10 +41,12 @@ Models/createAnswer_201_response.md
3941
Models/createQuestion_201_response.md
4042
Models/createTag_201_response.md
4143
Models/executeCode_200_response.md
44+
Models/getBookmarkedQuestions_200_response.md
4245
Models/getQuestionAnswers_200_response.md
4346
Models/getQuestionAnswers_200_response_allOf_data.md
4447
Models/getUserFollowers_200_response.md
4548
Models/getUserProfile_200_response.md
49+
Models/rateQuestion_200_response.md
4650
Models/resetPassword_request.md
4751
Models/searchQuestions_200_response.md
4852
Models/searchQuestions_200_response_allOf_data.md

api-docs/Apis/QuestionsApi.md

+52-2
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ All URIs are relative to *http://localhost:5173/api/v1*
44

55
| Method | HTTP request | Description |
66
|------------- | ------------- | -------------|
7-
| [**bookmarkQuestion**](QuestionsApi.md#bookmarkQuestion) | **POST** /questions/{questionId}/bookmark | Bookmark a question |
7+
| [**bookmarkQuestion**](QuestionsApi.md#bookmarkQuestion) | **POST** /questions/{questionId}/bookmarks | Bookmark a question |
88
| [**createQuestion**](QuestionsApi.md#createQuestion) | **POST** /questions | Create a new question |
99
| [**deleteQuestion**](QuestionsApi.md#deleteQuestion) | **DELETE** /questions/{questionId} | Delete a question |
1010
| [**downvoteQuestion**](QuestionsApi.md#downvoteQuestion) | **POST** /questions/{questionId}/downvote | Downvote a question |
11+
| [**getBookmarkedQuestions**](QuestionsApi.md#getBookmarkedQuestions) | **GET** /questions/bookmarked | Get bookmarked questions |
1112
| [**getQuestionDetails**](QuestionsApi.md#getQuestionDetails) | **GET** /questions/{questionId} | Get question details |
12-
| [**removeQuestionBookmark**](QuestionsApi.md#removeQuestionBookmark) | **DELETE** /questions/{questionId}/bookmark | Remove bookmark from a question |
13+
| [**rateQuestion**](QuestionsApi.md#rateQuestion) | **POST** /questions/{id}/vote-difficulty | Rate a question's level of difficulty. |
14+
| [**removeQuestionBookmark**](QuestionsApi.md#removeQuestionBookmark) | **DELETE** /questions/{questionId}/bookmarks | Remove bookmark from a question |
1315
| [**updateQuestion**](QuestionsApi.md#updateQuestion) | **PUT** /questions/{questionId} | Update a question |
1416
| [**upvoteQuestion**](QuestionsApi.md#upvoteQuestion) | **POST** /questions/{questionId}/upvote | Upvote a question |
1517

@@ -114,6 +116,28 @@ null (empty response body)
114116
- **Content-Type**: Not defined
115117
- **Accept**: application/json
116118

119+
<a name="getBookmarkedQuestions"></a>
120+
# **getBookmarkedQuestions**
121+
> getBookmarkedQuestions_200_response getBookmarkedQuestions()
122+
123+
Get bookmarked questions
124+
125+
### Parameters
126+
This endpoint does not need any parameter.
127+
128+
### Return type
129+
130+
[**getBookmarkedQuestions_200_response**](../Models/getBookmarkedQuestions_200_response.md)
131+
132+
### Authorization
133+
134+
[bearerAuth](../README.md#bearerAuth)
135+
136+
### HTTP request headers
137+
138+
- **Content-Type**: Not defined
139+
- **Accept**: application/json
140+
117141
<a name="getQuestionDetails"></a>
118142
# **getQuestionDetails**
119143
> createQuestion_201_response getQuestionDetails(questionId)
@@ -139,6 +163,32 @@ No authorization required
139163
- **Content-Type**: Not defined
140164
- **Accept**: application/json
141165

166+
<a name="rateQuestion"></a>
167+
# **rateQuestion**
168+
> rateQuestion_200_response rateQuestion(id, DifficultyLevelRequestDto)
169+
170+
Rate a question&#39;s level of difficulty.
171+
172+
### Parameters
173+
174+
|Name | Type | Description | Notes |
175+
|------------- | ------------- | ------------- | -------------|
176+
| **id** | **Long**| | [default to null] |
177+
| **DifficultyLevelRequestDto** | [**DifficultyLevelRequestDto**](../Models/DifficultyLevelRequestDto.md)| | |
178+
179+
### Return type
180+
181+
[**rateQuestion_200_response**](../Models/rateQuestion_200_response.md)
182+
183+
### Authorization
184+
185+
No authorization required
186+
187+
### HTTP request headers
188+
189+
- **Content-Type**: application/json
190+
- **Accept**: application/json
191+
142192
<a name="removeQuestionBookmark"></a>
143193
# **removeQuestionBookmark**
144194
> removeQuestionBookmark(questionId)

api-docs/Apis/SearchApi.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ All URIs are relative to *http://localhost:5173/api/v1*
1111

1212
<a name="searchQuestions"></a>
1313
# **searchQuestions**
14-
> searchQuestions_200_response searchQuestions(q, tags, difficulty, page, pageSize)
14+
> searchQuestions_200_response searchQuestions(q, tags, difficulty, page, pageSize, sortBy)
1515
1616
Search questions
1717

@@ -24,6 +24,7 @@ Search questions
2424
| **difficulty** | [**DifficultyLevel**](../Models/.md)| Filter by difficulty level | [optional] [default to null] [enum: EASY, MEDIUM, HARD] |
2525
| **page** | **Integer**| Page number | [optional] [default to 1] |
2626
| **pageSize** | **Integer**| Number of items per page | [optional] [default to 20] |
27+
| **sortBy** | **String**| Sorting type | [optional] [default to recommended] |
2728

2829
### Return type
2930

api-docs/Apis/TagsApi.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Follow a tag
4545

4646
|Name | Type | Description | Notes |
4747
|------------- | ------------- | ------------- | -------------|
48-
| **tagId** | **String**| | [default to null] |
48+
| **tagId** | **Integer**| | [default to null] |
4949

5050
### Return type
5151

@@ -70,7 +70,7 @@ Get tag details
7070

7171
|Name | Type | Description | Notes |
7272
|------------- | ------------- | ------------- | -------------|
73-
| **tagId** | **String**| | [default to null] |
73+
| **tagId** | **Integer**| | [default to null] |
7474

7575
### Return type
7676

@@ -95,7 +95,7 @@ Unfollow a tag
9595

9696
|Name | Type | Description | Notes |
9797
|------------- | ------------- | ------------- | -------------|
98-
| **tagId** | **String**| | [default to null] |
98+
| **tagId** | **Integer**| | [default to null] |
9999

100100
### Return type
101101

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# DifficultyLevelRequestDto
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **difficulty** | **String** | | [optional] [default to null] |
7+
8+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
9+

api-docs/Models/NewQuestion.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
| **title** | **String** | | [default to null] |
77
| **content** | **String** | | [default to null] |
88
| **tagIds** | **List** | | [optional] [default to null] |
9-
| **difficultyLevel** | [**DifficultyLevel**](DifficultyLevel.md) | | [default to null] |
9+
| **difficulty** | [**DifficultyLevel**](DifficultyLevel.md) | | [default to null] |
1010

1111
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1212

api-docs/Models/QuestionDetails.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
| **tags** | [**List**](TagSummary.md) | | [default to null] |
1313
| **likeCount** | **Integer** | | [default to null] |
1414
| **dislikeCount** | **Integer** | | [default to null] |
15+
| **difficulty** | [**DifficultyLevel**](DifficultyLevel.md) | | [default to null] |
1516
| **commentCount** | **Integer** | | [default to null] |
1617
| **viewCount** | **Integer** | | [optional] [default to null] |
17-
| **bookmarked** | **Boolean** | | [optional] [default to null] |
18-
| **selfVoted** | **Integer** | | [optional] [default to null] |
18+
| **bookmarked** | **Boolean** | | [default to null] |
19+
| **selfVoted** | **Integer** | | [default to null] |
20+
| **selfDifficultyVote** | [**DifficultyLevel**](DifficultyLevel.md) | | [default to null] |
21+
| **easyCount** | **Integer** | | [default to null] |
22+
| **mediumCount** | **Integer** | | [default to null] |
23+
| **hardCount** | **Integer** | | [default to null] |
1924

2025
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2126

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# QuestionRateResponseDto
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **questionId** | **Long** | | [optional] [default to null] |
7+
| **easyCount** | **Long** | | [optional] [default to null] |
8+
| **mediumCount** | **Long** | | [optional] [default to null] |
9+
| **hardCount** | **Long** | | [optional] [default to null] |
10+
| **totalCount** | **Long** | | [optional] [default to null] |
11+
12+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
13+

api-docs/Models/QuestionSummary.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
|------------ | ------------- | ------------- | -------------|
66
| **id** | **Integer** | | [default to null] |
77
| **title** | **String** | | [default to null] |
8-
| **questionBody** | **String** | | [optional] [default to null] |
8+
| **content** | **String** | | [optional] [default to null] |
99
| **author** | [**UserSummary**](UserSummary.md) | | [optional] [default to null] |
1010
| **createdAt** | **Date** | | [default to null] |
11-
| **difficultyLevel** | [**DifficultyLevel**](DifficultyLevel.md) | | [default to null] |
11+
| **difficulty** | [**DifficultyLevel**](DifficultyLevel.md) | | [default to null] |
1212
| **tags** | [**List**](TagSummary.md) | | [default to null] |
13-
| **likeCount** | **Integer** | | [default to null] |
14-
| **commentCount** | **Integer** | | [default to null] |
13+
| **upvoteCount** | **Integer** | | [default to null] |
14+
| **downvoteCount** | **Integer** | | [default to null] |
15+
| **answerCount** | **Integer** | | [default to null] |
1516
| **viewCount** | **Integer** | | [optional] [default to null] |
1617

1718
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

api-docs/Models/TagDetails.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
| Name | Type | Description | Notes |
55
|------------ | ------------- | ------------- | -------------|
6-
| **tagId** | **String** | | [default to null] |
6+
| **tagId** | **Integer** | | [default to null] |
77
| **name** | **String** | | [default to null] |
88
| **tagType** | [**TagType**](TagType.md) | | [optional] [default to null] |
99
| **description** | **String** | | [default to null] |

api-docs/Models/TagSummary.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
|------------ | ------------- | ------------- | -------------|
66
| **id** | **String** | | [optional] [default to null] |
77
| **name** | **String** | | [optional] [default to null] |
8+
| **tagType** | [**TagType**](TagType.md) | | [optional] [default to null] |
89
| **questionCount** | **Integer** | | [optional] [default to null] |
910
| **photo** | **String** | | [optional] [default to null] |
1011

api-docs/Models/UserProfile.md

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
| **answerCount** | **Integer** | | [optional] [default to null] |
2020
| **answers** | [**List**](AnswerDetails.md) | | [optional] [default to null] |
2121
| **questions** | [**List**](QuestionSummary.md) | | [optional] [default to null] |
22+
| **followedTags** | [**List**](TagSummary.md) | | [optional] [default to null] |
2223

2324
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2425

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# getBookmarkedQuestions_200_response
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **status** | **Integer** | Internal status code of the response. An HTTP 200 response with an internal 500 status code is an error response. Prioritize the inner status over the HTTP status. | [default to null] |
7+
| **data** | [**List**](QuestionSummary.md) | | [default to null] |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# rateQuestion_200_response
2+
## Properties
3+
4+
| Name | Type | Description | Notes |
5+
|------------ | ------------- | ------------- | -------------|
6+
| **status** | **Integer** | Internal status code of the response. An HTTP 200 response with an internal 500 status code is an error response. Prioritize the inner status over the HTTP status. | [default to null] |
7+
| **data** | [**QuestionRateResponseDto**](QuestionRateResponseDto.md) | | [default to null] |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

api-docs/README.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@ All URIs are relative to *http://localhost:5173/api/v1*
2020
*AuthApi* | [**verifyEmail**](Apis/AuthApi.md#verifyemail) | **POST** /auth/verify-email | Verify user's email |
2121
| *CodeExecutionApi* | [**executeCode**](Apis/CodeExecutionApi.md#executecode) | **POST** /execute-code | Execute a code snippet |
2222
| *FeedApi* | [**getUserFeed**](Apis/FeedApi.md#getuserfeed) | **GET** /feed | Get user feed |
23-
| *QuestionsApi* | [**bookmarkQuestion**](Apis/QuestionsApi.md#bookmarkquestion) | **POST** /questions/{questionId}/bookmark | Bookmark a question |
23+
| *QuestionsApi* | [**bookmarkQuestion**](Apis/QuestionsApi.md#bookmarkquestion) | **POST** /questions/{questionId}/bookmarks | Bookmark a question |
2424
*QuestionsApi* | [**createQuestion**](Apis/QuestionsApi.md#createquestion) | **POST** /questions | Create a new question |
2525
*QuestionsApi* | [**deleteQuestion**](Apis/QuestionsApi.md#deletequestion) | **DELETE** /questions/{questionId} | Delete a question |
2626
*QuestionsApi* | [**downvoteQuestion**](Apis/QuestionsApi.md#downvotequestion) | **POST** /questions/{questionId}/downvote | Downvote a question |
27+
*QuestionsApi* | [**getBookmarkedQuestions**](Apis/QuestionsApi.md#getbookmarkedquestions) | **GET** /questions/bookmarked | Get bookmarked questions |
2728
*QuestionsApi* | [**getQuestionDetails**](Apis/QuestionsApi.md#getquestiondetails) | **GET** /questions/{questionId} | Get question details |
28-
*QuestionsApi* | [**removeQuestionBookmark**](Apis/QuestionsApi.md#removequestionbookmark) | **DELETE** /questions/{questionId}/bookmark | Remove bookmark from a question |
29+
*QuestionsApi* | [**rateQuestion**](Apis/QuestionsApi.md#ratequestion) | **POST** /questions/{id}/vote-difficulty | Rate a question's level of difficulty. |
30+
*QuestionsApi* | [**removeQuestionBookmark**](Apis/QuestionsApi.md#removequestionbookmark) | **DELETE** /questions/{questionId}/bookmarks | Remove bookmark from a question |
2931
*QuestionsApi* | [**updateQuestion**](Apis/QuestionsApi.md#updatequestion) | **PUT** /questions/{questionId} | Update a question |
3032
*QuestionsApi* | [**upvoteQuestion**](Apis/QuestionsApi.md#upvotequestion) | **POST** /questions/{questionId}/upvote | Upvote a question |
3133
| *SearchApi* | [**searchQuestions**](Apis/SearchApi.md#searchquestions) | **GET** /search/questions | Search questions |
@@ -51,6 +53,7 @@ All URIs are relative to *http://localhost:5173/api/v1*
5153
- [AuthToken](./Models/AuthToken.md)
5254
- [CodeExecution](./Models/CodeExecution.md)
5355
- [DifficultyLevel](./Models/DifficultyLevel.md)
56+
- [DifficultyLevelRequestDto](./Models/DifficultyLevelRequestDto.md)
5457
- [Error](./Models/Error.md)
5558
- [ErrorResponseObject](./Models/ErrorResponseObject.md)
5659
- [ExecutionResult](./Models/ExecutionResult.md)
@@ -60,6 +63,7 @@ All URIs are relative to *http://localhost:5173/api/v1*
6063
- [NewTag](./Models/NewTag.md)
6164
- [Profile](./Models/Profile.md)
6265
- [QuestionDetails](./Models/QuestionDetails.md)
66+
- [QuestionRateResponseDto](./Models/QuestionRateResponseDto.md)
6367
- [QuestionSummary](./Models/QuestionSummary.md)
6468
- [SuccessResponseObject](./Models/SuccessResponseObject.md)
6569
- [SuccessResponseObject_data](./Models/SuccessResponseObject_data.md)
@@ -78,10 +82,12 @@ All URIs are relative to *http://localhost:5173/api/v1*
7882
- [createQuestion_201_response](./Models/createQuestion_201_response.md)
7983
- [createTag_201_response](./Models/createTag_201_response.md)
8084
- [executeCode_200_response](./Models/executeCode_200_response.md)
85+
- [getBookmarkedQuestions_200_response](./Models/getBookmarkedQuestions_200_response.md)
8186
- [getQuestionAnswers_200_response](./Models/getQuestionAnswers_200_response.md)
8287
- [getQuestionAnswers_200_response_allOf_data](./Models/getQuestionAnswers_200_response_allOf_data.md)
8388
- [getUserFollowers_200_response](./Models/getUserFollowers_200_response.md)
8489
- [getUserProfile_200_response](./Models/getUserProfile_200_response.md)
90+
- [rateQuestion_200_response](./Models/rateQuestion_200_response.md)
8591
- [resetPassword_request](./Models/resetPassword_request.md)
8692
- [searchQuestions_200_response](./Models/searchQuestions_200_response.md)
8793
- [searchQuestions_200_response_allOf_data](./Models/searchQuestions_200_response_allOf_data.md)

openapitools.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
3+
"spaces": 2,
4+
"generator-cli": {
5+
"version": "7.10.0"
6+
}
7+
}

swagger/openapi.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1772,7 +1772,6 @@ components:
17721772
type: array
17731773
items:
17741774
$ref: "#/components/schemas/TagSummary"
1775-
examples:
17761775

17771776

17781777
UpdateProfile:

0 commit comments

Comments
 (0)