Skip to content

Commit

Permalink
add api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmtftr committed Nov 29, 2024
1 parent 3b0ae5f commit 5165b52
Show file tree
Hide file tree
Showing 58 changed files with 1,686 additions and 0 deletions.
23 changes: 23 additions & 0 deletions api-docs/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
55 changes: 55 additions & 0 deletions api-docs/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
.openapi-generator-ignore
Apis/AnswersApi.md
Apis/AuthApi.md
Apis/CodeExecutionApi.md
Apis/FeedApi.md
Apis/QuestionsApi.md
Apis/SearchApi.md
Apis/TagsApi.md
Apis/UserApi.md
Apis/UsersApi.md
Models/AnswerDetails.md
Models/AuthToken.md
Models/CodeExecution.md
Models/DifficultyLevel.md
Models/Error.md
Models/ErrorResponseObject.md
Models/ExecutionResult.md
Models/ExperienceLevel.md
Models/NewAnswer.md
Models/NewQuestion.md
Models/NewTag.md
Models/Profile.md
Models/QuestionDetails.md
Models/QuestionSummary.md
Models/SuccessResponseObject.md
Models/SuccessResponseObject_data.md
Models/TagDetails.md
Models/TagSummary.md
Models/TagType.md
Models/UpdateAnswer.md
Models/UpdateProfile.md
Models/UpdateQuestion.md
Models/UserLogin.md
Models/UserProfile.md
Models/UserProfileUpdate.md
Models/UserRegistration.md
Models/UserSummary.md
Models/createAnswer_201_response.md
Models/createQuestion_201_response.md
Models/createTag_201_response.md
Models/executeCode_200_response.md
Models/getQuestionAnswers_200_response.md
Models/getQuestionAnswers_200_response_allOf_data.md
Models/getUserFollowers_200_response.md
Models/getUserProfile_200_response.md
Models/resetPassword_request.md
Models/searchQuestions_200_response.md
Models/searchQuestions_200_response_allOf_data.md
Models/searchTags_200_response.md
Models/searchTags_200_response_allOf_data.md
Models/searchUsers_200_response.md
Models/searchUsers_200_response_allOf_data.md
Models/signUp_201_response.md
Models/verifyEmail_request.md
README.md
1 change: 1 addition & 0 deletions api-docs/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.10.0
166 changes: 166 additions & 0 deletions api-docs/Apis/AnswersApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
# AnswersApi

All URIs are relative to *http://localhost:5173/api/v1*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**createAnswer**](AnswersApi.md#createAnswer) | **POST** /questions/{questionId}/answers | Create a new answer |
| [**deleteAnswer**](AnswersApi.md#deleteAnswer) | **DELETE** /answers/{answerId} | Delete an answer |
| [**downvoteAnswer**](AnswersApi.md#downvoteAnswer) | **POST** /answers/{answerId}/downvote | Downvote an answer |
| [**getQuestionAnswers**](AnswersApi.md#getQuestionAnswers) | **GET** /questions/{questionId}/answers | Get answers for a question |
| [**updateAnswer**](AnswersApi.md#updateAnswer) | **PUT** /answers/{answerId} | Update an answer |
| [**upvoteAnswer**](AnswersApi.md#upvoteAnswer) | **POST** /answers/{answerId}/upvote | Upvote an answer |


<a name="createAnswer"></a>
# **createAnswer**
> createAnswer_201_response createAnswer(questionId, NewAnswer)
Create a new answer

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **questionId** | **Integer**| | [default to null] |
| **NewAnswer** | [**NewAnswer**](../Models/NewAnswer.md)| | |

### Return type

[**createAnswer_201_response**](../Models/createAnswer_201_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="deleteAnswer"></a>
# **deleteAnswer**
> deleteAnswer(answerId)
Delete an answer

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **answerId** | **Integer**| | [default to null] |

### Return type

null (empty response body)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="downvoteAnswer"></a>
# **downvoteAnswer**
> downvoteAnswer(answerId)
Downvote an answer

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **answerId** | **Integer**| | [default to null] |

### Return type

null (empty response body)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="getQuestionAnswers"></a>
# **getQuestionAnswers**
> getQuestionAnswers_200_response getQuestionAnswers(questionId)
Get answers for a question

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **questionId** | **Integer**| | [default to null] |

### Return type

[**getQuestionAnswers_200_response**](../Models/getQuestionAnswers_200_response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="updateAnswer"></a>
# **updateAnswer**
> createAnswer_201_response updateAnswer(answerId, UpdateAnswer)
Update an answer

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **answerId** | **Integer**| | [default to null] |
| **UpdateAnswer** | [**UpdateAnswer**](../Models/UpdateAnswer.md)| | |

### Return type

[**createAnswer_201_response**](../Models/createAnswer_201_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="upvoteAnswer"></a>
# **upvoteAnswer**
> upvoteAnswer(answerId)
Upvote an answer

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **answerId** | **Integer**| | [default to null] |

### Return type

null (empty response body)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

135 changes: 135 additions & 0 deletions api-docs/Apis/AuthApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
# AuthApi

All URIs are relative to *http://localhost:5173/api/v1*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**login**](AuthApi.md#login) | **POST** /auth/login | User login |
| [**logout**](AuthApi.md#logout) | **POST** /auth/logout | User logout |
| [**resetPassword**](AuthApi.md#resetPassword) | **POST** /auth/reset-password | Reset user&#39;s password |
| [**signUp**](AuthApi.md#signUp) | **POST** /auth/signup | Register a new user |
| [**verifyEmail**](AuthApi.md#verifyEmail) | **POST** /auth/verify-email | Verify user&#39;s email |


<a name="login"></a>
# **login**
> signUp_201_response login(UserLogin)
User login

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **UserLogin** | [**UserLogin**](../Models/UserLogin.md)| | |

### Return type

[**signUp_201_response**](../Models/signUp_201_response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="logout"></a>
# **logout**
> logout()
User logout

### Parameters
This endpoint does not need any parameter.

### Return type

null (empty response body)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

<a name="resetPassword"></a>
# **resetPassword**
> resetPassword(resetPassword\_request)
Reset user&#39;s password

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **resetPassword\_request** | [**resetPassword_request**](../Models/resetPassword_request.md)| | |

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="signUp"></a>
# **signUp**
> signUp_201_response signUp(UserRegistration)
Register a new user

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **UserRegistration** | [**UserRegistration**](../Models/UserRegistration.md)| | |

### Return type

[**signUp_201_response**](../Models/signUp_201_response.md)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

<a name="verifyEmail"></a>
# **verifyEmail**
> verifyEmail(verifyEmail\_request)
Verify user&#39;s email

### Parameters

|Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **verifyEmail\_request** | [**verifyEmail_request**](../Models/verifyEmail_request.md)| | |

### Return type

null (empty response body)

### Authorization

No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

Loading

0 comments on commit 5165b52

Please sign in to comment.