From b01276ff5a6485c5fecbfcca3c4c51330b12c8c6 Mon Sep 17 00:00:00 2001 From: timiajayi Date: Tue, 20 Aug 2024 19:58:28 +0100 Subject: [PATCH] api doc update --- resources/docs/docs tulbadex.json | 2612 ++++++++++++++++++ resources/docs/docs.json | 4158 ++++++++++++++--------------- 2 files changed, 4604 insertions(+), 2166 deletions(-) create mode 100644 resources/docs/docs tulbadex.json diff --git a/resources/docs/docs tulbadex.json b/resources/docs/docs tulbadex.json new file mode 100644 index 00000000..fc282d24 --- /dev/null +++ b/resources/docs/docs tulbadex.json @@ -0,0 +1,2612 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "PHP Laravel API Boilerplate", + "description": "API documentation for the boilerplate", + "version": "1.0.0" + }, + "servers": [ + { + "url": "https://virtserver.swaggerhub.com/TULBADEX_1/HNG-Task-4/1.0.0", + "description": "SwaggerHub API Auto Mocking" + }, + { + "url": "https://staging.api-php.boilerplate.hng.tech", + "description": "Deployment server" + } + ], + "tags": [ + { + "name": "Authentication" + }, + { + "name": "Users" + }, + { + "name": "User Dashboard" + }, + { + "name": "Organisations" + }, + { + "name": "Testimonials" + }, + { + "name": "Jobs" + }, + { + "name": "Customers" + }, + { + "name": "Roles" + }, + { + "name": "Products" + }, + { + "name": "Articles" + }, + { + "name": "Contact" + }, + { + "name": "Blogs" + }, + { + "name": "Squeeze" + }, + { + "name": "Features" + }, + { + "name": "Plans" + } + ], + "paths": { + "/api/v1/auth/register": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Register a new user", + "description": "Endpoint to register a new user and return JWT token.", + "requestBody": { + "$ref": "#/components/requestBodies/RegisterRequest" + }, + "responses": { + "201": { + "description": "User created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_201" + } + } + } + }, + "400": { + "description": "Validation or registration error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400" + } + } + } + } + } + } + }, + "/api/v1/auth/login": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "User login", + "description": "Endpoint for user login and returning an access token.", + "requestBody": { + "$ref": "#/components/requestBodies/LoginRequest" + }, + "responses": { + "200": { + "description": "Login successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200" + } + } + } + }, + "400": { + "description": "Bad request, validation errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_1" + } + } + } + }, + "401": { + "description": "Invalid credentials provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401" + } + } + } + } + } + } + }, + "/api/v1/auth/logout": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Logout a user", + "description": "Endpoint to invalidate the user’s JWT token.", + "responses": { + "200": { + "description": "Logout successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_1" + } + } + } + }, + "401": { + "description": "Error during logout, e.g., token issues", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401_1" + } + } + } + } + } + } + }, + "/api/v1/auth/forgot-password": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Request a password reset token", + "description": "Endpoint to request a password reset token by providing the user's email address.", + "requestBody": { + "$ref": "#/components/requestBodies/ForgotPasswordRequest" + }, + "responses": { + "200": { + "description": "Success response for forgot password request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_2" + } + } + } + }, + "400": { + "description": "Error response for forgot password request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_2" + } + } + } + }, + "422": { + "description": "Validation error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_422" + } + } + } + } + } + } + }, + "/api/v1/auth/verify-otp": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Verify OTP for password reset", + "description": "Endpoint to verify OTP (token) sent to the user for password reset.", + "requestBody": { + "$ref": "#/components/requestBodies/VerifyOtpRequest" + }, + "responses": { + "200": { + "description": "Success response for OTP verification", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_3" + } + } + } + }, + "400": { + "description": "Invalid OTP or email response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_3" + } + } + } + }, + "401": { + "description": "Validation error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401_2" + } + } + } + } + } + } + }, + "/api/v1/auth/reset-forgot-password": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Reset password after OTP verification", + "description": "Endpoint to reset a user’s password after verifying the OTP.", + "requestBody": { + "$ref": "#/components/requestBodies/ResetPasswordRequest" + }, + "responses": { + "200": { + "description": "Password reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_4" + } + } + } + }, + "400": { + "description": "Error response for password reset request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_4" + } + } + } + } + } + } + }, + "/api/v1/auth/google": { + "post": { + "tags": [ + "Authentication" + ], + "summary": "Authenticate a user using Google token", + "description": "This endpoint validates the provided Google token and email, creates or updates the user, and returns a JWT token upon successful authentication.", + "requestBody": { + "$ref": "#/components/requestBodies/GoogleResponseProcess" + }, + "responses": { + "200": { + "description": "Successful authentication and user creation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_5" + } + } + } + }, + "400": { + "description": "Bad request due to invalid token or mismatched email", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_5" + } + } + } + }, + "422": { + "description": "Validation error for missing or invalid parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_422_1" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_500" + } + } + } + } + } + } + }, + "/api/v1/auth/login-google": { + "get": { + "tags": [ + "Authentication" + ], + "summary": "Redirect to Google for authentication", + "description": "This endpoint redirects the user to Google for authentication. It is intended to be accessed via a browser. This endpoint initiates the OAuth 2.0 authentication process with Google.", + "responses": { + "302": { + "description": "Redirects the user to Google for authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_302" + } + } + } + } + } + } + }, + "/api/v1/auth/google/callback": { + "get": { + "tags": [ + "Authentication" + ], + "summary": "Handle Google authentication callback", + "description": "This endpoint is called by Google after successful authentication. It handles user data from Google, creates or updates a user in the database, and returns a JWT token for authentication.", + "responses": { + "200": { + "description": "Successful Google authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_6" + } + } + } + } + } + }, + "post": { + "tags": [ + "Authentication" + ], + "summary": "Save Google user data", + "description": "Alternative endpoint to handle Google authentication via POST when the redirect is not available. It updates or creates a user in the database and returns a JWT token for authentication.", + "requestBody": { + "$ref": "#/components/requestBodies/GoogleUserRequest" + }, + "responses": { + "201": { + "description": "User successfully authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_201_1" + } + } + } + }, + "400": { + "description": "Bad request, invalid data provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_6" + } + } + } + }, + "401": { + "description": "Unauthorized error, invalid credentials or missing data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401_3" + } + } + } + } + } + } + }, + "/api/v1/auth/login-facebook": { + "get": { + "tags": [ + "Authentication" + ], + "summary": "Redirect to Facebook for login", + "description": "Redirects the user to Facebook for authentication. This endpoint cannot be tested directly via Postman or documentation tools as it performs a redirect.", + "responses": { + "302": { + "description": "Redirects to Facebook for authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookRedirectResponse" + } + } + } + } + } + } + }, + "/api/v1/auth/facebook/callback": { + "get": { + "tags": [ + "Authentication" + ], + "summary": "Handle Facebook callback and authenticate user", + "description": "This endpoint handles the callback from Facebook after successful authentication, updates or creates the user, and returns a JWT token.", + "responses": { + "200": { + "description": "Successful authentication and token generation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookCallbackResponseSchema" + } + } + } + } + } + }, + "post": { + "tags": [ + "Authentication" + ], + "summary": "Handle Facebook data submission and authenticate user", + "description": "This endpoint processes Facebook user data sent via POST request, updates or creates the user, and returns a JWT token. It is used as an alternative to the GET callback for cases where direct data processing is needed.", + "requestBody": { + "$ref": "#/components/requestBodies/FacebookUserRequest" + }, + "responses": { + "201": { + "description": "Successful authentication and token generation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookCallbackPostResponseSchema" + } + } + } + }, + "400": { + "description": "Bad request error due to invalid data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_7" + } + } + } + } + } + } + }, + "/api/v1/user-analytics": { + "get": { + "tags": [ + "User Dashboard" + ], + "summary": "Revenue by months of the year", + "responses": { + "200": { + "description": "User Analytics", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserAnalyticsResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + }, + "500": { + "description": "An error occurred", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorResponse" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/api/v1/payments/flutterwave": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Initiate a payment using Flutterwave", + "description": "Allows authenticated users with appropriate permissions to initiate a payment through Flutterwave.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Payment initiated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthError" + } + } + } + }, + "403": { + "description": "Authorization error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthzError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerError" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/api/v1/payments/paystack": { + "post": { + "tags": [ + "Payments" + ], + "summary": "Initiate a payment using Paystack", + "description": "Allows authenticated users with appropriate permissions to initiate a payment through Paystack.", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PaymentRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Payment initiated successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SuccessResponse" + } + } + } + }, + "400": { + "description": "Validation error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ValidationError" + } + } + } + }, + "401": { + "description": "Authentication required", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthError" + } + } + } + }, + "403": { + "description": "Authorization error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AuthzError" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServerError" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/languages": { + "get": { + "tags": [ + "Languages" + ], + "summary": "Get all supported languages", + "responses": { + "200": { + "description": "List of supported languages", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguagesListResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedResponse" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + }, + "post": { + "tags": [ + "Languages" + ], + "summary": "Create a new language", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLanguageRequest" + } + } + }, + "required": true + }, + "responses": { + "201": { + "description": "Language Created Successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateLanguageResponse" + } + } + } + }, + "400": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageValidationError" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedResponse" + } + } + } + }, + "409": { + "description": "Language already exists", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageConflictError" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/languages/{id}": { + "patch": { + "tags": [ + "Languages" + ], + "summary": "Update a language", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Language ID", + "required": true, + "style": "simple", + "explode": false, + "schema": { + "type": "string", + "example": "uuid" + } + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateLanguageRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "Language successfully updated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateLanguageResponse" + } + } + } + }, + "400": { + "description": "Validation Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageValidationError" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UnauthorizedResponse" + } + } + } + }, + "404": { + "description": "Language not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LanguageNotFoundError" + } + } + } + } + }, + "security": [ + { + "bearerAuth": [] + } + ] + } + }, + "/api/v1/billing-plans/{id}": { + "get": { + "tags": [ + "Billing Plans" + ], + "summary": "Retrieve a billing plan", + "description": "Fetch the details of a single billing plan.", + "operationId": "getBillingPlan", + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The ID of the billing plan to retrieve", + "required": true, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Billing plan retrieved successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingPlanResponse" + } + } + } + }, + "400": { + "description": "Invalid billing plan ID", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingPlanErrorResponse" + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingPlanErrorResponse" + } + } + } + }, + "404": { + "description": "Billing plan not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingPlanErrorResponse" + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BillingPlanErrorResponse" + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "FacebookRedirectResponse": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 302 + }, + "message": { + "type": "string", + "example": "Redirecting to Facebook for authentication" + } + } + }, + "FacebookCallbackResponseSchema": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "User successfully authenticated" + }, + "access_token": { + "type": "string", + "example": "your_jwt_token_here" + }, + "data": { + "$ref": "#/components/schemas/FacebookCallbackResponseSchema_data" + } + } + }, + "FacebookCallbackPostResponseSchema": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 201 + }, + "message": { + "type": "string", + "example": "User successfully authenticated" + }, + "access_token": { + "type": "string", + "example": "your_jwt_token_here" + }, + "data": { + "$ref": "#/components/schemas/FacebookCallbackResponseSchema_data" + } + } + }, + "UserAnalyticsResponse": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "User analytics retrieved successfully" + }, + "status_code": { + "type": "integer", + "example": 200 + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserAnalyticsResponse_data" + } + } + } + }, + "PaymentRequest": { + "required": [ + "billing_option", + "full_name", + "organisation_id", + "plan_id", + "redirect_url" + ], + "type": "object", + "properties": { + "organisation_id": { + "type": "string", + "description": "ID of the organisation making the payment" + }, + "plan_id": { + "type": "string", + "description": "ID of the plan being purchased" + }, + "full_name": { + "type": "string", + "description": "Full name of the payer" + }, + "billing_option": { + "type": "string", + "description": "Billing option for the payment", + "enum": [ + "monthly", + "yearly" + ] + }, + "redirect_url": { + "type": "string", + "description": "URL to redirect to after payment completion", + "format": "uri" + } + } + }, + "SuccessResponse": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Payment initiated successfully" + }, + "data": { + "$ref": "#/components/schemas/SuccessResponse_data" + } + } + }, + "ValidationError": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Validation error: amount must be a positive number" + } + } + }, + "AuthError": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 401 + }, + "message": { + "type": "string", + "example": "Authentication required" + } + } + }, + "AuthzError": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 403 + }, + "message": { + "type": "string", + "example": "You do not have permission to initiate this payment" + } + } + }, + "ServerError": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 500 + }, + "message": { + "type": "string", + "example": "An unexpected error occurred. Please try again later." + } + } + }, + "ErrorResponse": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 500 + }, + "message": { + "type": "string", + "example": "Error message" + } + } + }, + "LanguagesListResponse": { + "required": [ + "languages", + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Languages retrieved successfully" + }, + "languages": { + "type": "array", + "items": { + "$ref": "#/components/schemas/LanguagesListResponse_languages" + } + } + } + }, + "CreateLanguageRequest": { + "required": [ + "code", + "language" + ], + "type": "object", + "properties": { + "language": { + "type": "string", + "example": "English" + }, + "code": { + "type": "string", + "example": "en" + }, + "description": { + "type": "string", + "example": "English Language" + } + } + }, + "CreateLanguageResponse": { + "required": [ + "language", + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 201 + }, + "message": { + "type": "string", + "example": "Language Created Successfully" + }, + "language": { + "$ref": "#/components/schemas/LanguagesListResponse_languages" + } + } + }, + "UpdateLanguageRequest": { + "required": [ + "code", + "language" + ], + "type": "object", + "properties": { + "language": { + "type": "string", + "example": "English" + }, + "code": { + "type": "string", + "example": "en" + }, + "description": { + "type": "string", + "example": "English Language" + } + } + }, + "UpdateLanguageResponse": { + "required": [ + "language", + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Language successfully updated" + }, + "language": { + "$ref": "#/components/schemas/LanguagesListResponse_languages" + } + } + }, + "LanguageValidationError": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Validation Error" + }, + "errors": { + "$ref": "#/components/schemas/LanguageValidationError_errors" + } + } + }, + "LanguageConflictError": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 409 + }, + "message": { + "type": "string", + "example": "Language already exists" + } + } + }, + "LanguageNotFoundError": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 404 + }, + "message": { + "type": "string", + "example": "Language not found" + } + } + }, + "UnauthorizedResponse": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 401 + }, + "message": { + "type": "string", + "example": "Unauthorized" + } + } + }, + "BillingPlanResponse": { + "required": [ + "data", + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Billing plan retrieved successfully" + }, + "data": { + "$ref": "#/components/schemas/BillingPlanResponse_data" + } + } + }, + "BillingPlanErrorResponse": { + "required": [ + "message", + "status" + ], + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Error occurred" + } + } + }, + "inline_response_201": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 201 + }, + "message": { + "type": "string", + "example": "User Created Successfully" + }, + "token": { + "type": "string", + "example": "jwt_token_string" + }, + "data": { + "$ref": "#/components/schemas/inline_response_201_data" + } + } + }, + "inline_response_400": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Registration unsuccessful" + } + } + }, + "inline_response_200": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Login successful" + }, + "access_token": { + "type": "string", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjMwZTMwZWUzLTYxZjUtNDkyMi1iZjcyLTc2YjFmMDE0NTc5NyIsInN1YiI6IjMwZTMwZWUzLTYxZjUtNDkyMi1iZjcyLTc2YjFmMDE0NTc5NyIsImlhdCI6MTcyMjk3MzgxMiwiZXhwIjoxNzIyOTk1NDEyfQ.D8kt6U6Icctlyg78Y8FFIlIr96bwONQs5hN_sCO2SHc" + }, + "data": { + "$ref": "#/components/schemas/inline_response_200_data" + } + } + }, + "inline_response_401": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 401 + }, + "message": { + "type": "string", + "example": "Invalid credentials" + } + } + }, + "inline_response_400_1": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "array", + "example": [ + "password should not be empty" + ], + "items": { + "type": "string" + } + } + } + }, + "inline_response_200_1": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Logout successful" + } + } + }, + "inline_response_401_1": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 401 + }, + "message": { + "type": "string", + "example": "Invalid token or other error" + }, + "error": { + "type": "string", + "example": "Token invalidation error" + } + } + }, + "inline_response_200_2": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Email sent successfully" + } + } + }, + "inline_response_400_2": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Account with the specified email doesn't exist" + } + } + }, + "inline_response_422": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 422 + }, + "message": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "email": "The email field is required." + } + } + } + }, + "inline_response_200_3": { + "type": "object", + "properties": { + "message": { + "type": "string", + "example": "Token Validated Successfully" + }, + "status_code": { + "type": "integer", + "example": 200 + } + } + }, + "inline_response_400_3": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 401 + }, + "message": { + "type": "string", + "example": "Invalid token or email" + } + } + }, + "inline_response_401_2": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "example": { + "email": "The email field is required." + } + } + } + }, + "inline_response_200_4": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "Password reset successfully" + } + } + }, + "inline_response_400_4": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "User does not exist or validation errors occurred" + } + } + }, + "inline_response_200_5": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "User Created Successfully" + }, + "access_token": { + "type": "string", + "description": "JWT token for authenticated user.", + "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." + }, + "data": { + "$ref": "#/components/schemas/inline_response_200_5_data" + } + } + }, + "inline_response_400_5": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "error": { + "type": "string", + "example": "Bad Request" + }, + "message": { + "type": "string", + "example": "Invalid Google token" + } + } + }, + "inline_response_422_1": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 422 + }, + "message": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "inline_response_500": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 500 + }, + "message": { + "type": "string", + "example": "Error message" + } + } + }, + "inline_response_302": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Indicates the user is being redirected to Google for authentication.", + "example": "Redirecting" + } + } + }, + "inline_response_200_6": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 200 + }, + "message": { + "type": "string", + "example": "User successfully authenticated" + }, + "access_token": { + "type": "string", + "example": "jwt_token_string" + }, + "data": { + "$ref": "#/components/schemas/inline_response_200_6_data" + } + } + }, + "inline_response_201_1": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 201 + }, + "message": { + "type": "string", + "example": "User successfully authenticated" + }, + "access_token": { + "type": "string", + "example": "jwt_token_string" + }, + "data": { + "$ref": "#/components/schemas/inline_response_201_1_data" + } + } + }, + "inline_response_400_6": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Invalid data provided" + } + } + }, + "inline_response_401_3": { + "type": "object", + "properties": { + "status_code": { + "type": "integer", + "example": 401 + }, + "message": { + "type": "string", + "example": "Unauthorized" + } + } + }, + "inline_response_400_7": { + "type": "object", + "properties": { + "status": { + "type": "integer", + "example": 400 + }, + "message": { + "type": "string", + "example": "Bad request" + } + } + }, + "FacebookCallbackResponseSchema_data": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 1 + }, + "email": { + "type": "string", + "example": "user@example.com" + }, + "first_name": { + "type": "string", + "example": "John" + }, + "last_name": { + "type": "string", + "example": "Doe" + } + } + }, + "UserAnalyticsResponse_data": { + "type": "object", + "properties": { + "jan": { + "type": "string", + "example": "1000" + }, + "feb": { + "type": "string", + "example": "10000" + }, + "mar": { + "type": "string", + "example": "1000" + }, + "apr": { + "type": "string", + "example": "10000" + }, + "may": { + "type": "string", + "example": "1000" + }, + "jun": { + "type": "string", + "example": "500" + }, + "jul": { + "type": "string", + "example": "5000" + }, + "aug": { + "type": "string", + "example": "1000" + }, + "sep": { + "type": "string", + "example": "10" + }, + "oct": { + "type": "string", + "example": "12000" + }, + "nov": { + "type": "string", + "example": "11000" + }, + "dec": { + "type": "string", + "example": "5000" + } + } + }, + "SuccessResponse_data": { + "type": "object", + "properties": { + "payment_url": { + "type": "string", + "example": "https://example.com/checkout?paymentId=pay_abc123" + } + } + }, + "LanguagesListResponse_languages": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "uuid" + }, + "language": { + "type": "string", + "example": "English" + }, + "code": { + "type": "string", + "example": "en" + }, + "description": { + "type": "string", + "example": "English Language" + } + } + }, + "LanguageValidationError_errors": { + "type": "object", + "properties": { + "language": { + "type": "array", + "example": [ + "The language field is required." + ], + "items": { + "type": "string" + } + }, + "code": { + "type": "array", + "example": [ + "The code field is required." + ], + "items": { + "type": "string" + } + } + } + }, + "BillingPlanResponse_data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "123e4567-e89b-12d3-a456-426614174000" + }, + "name": { + "type": "string", + "example": "Premium Plan" + }, + "price": { + "type": "number", + "format": "float", + "example": 49.99 + }, + "features": { + "type": "array", + "example": [ + "Feature 1", + "Feature 2", + "Feature 3" + ], + "items": { + "type": "string" + } + }, + "description": { + "type": "string", + "example": "A comprehensive plan for premium users" + } + } + }, + "inline_response_201_data_user": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 1 + }, + "first_name": { + "type": "string", + "example": "John" + }, + "last_name": { + "type": "string", + "example": "Doe" + }, + "email": { + "type": "string", + "example": "john.doe@example.com" + }, + "avatar_url": { + "type": "string", + "example": "http://example.com/avatar.jpg" + }, + "role": { + "type": "string", + "example": "user" + } + } + }, + "inline_response_201_data": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/inline_response_201_data_user" + } + } + }, + "inline_response_200_data_user": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "30e30ee3-61f5-4922-bf72-76b1f0145797" + }, + "first_name": { + "type": "string", + "example": "string" + }, + "last_name": { + "type": "string", + "example": "string" + }, + "email": { + "type": "string", + "example": "tulbadex@gmail.com" + }, + "role": { + "type": "string", + "example": "super-admin" + }, + "avatar_url": { + "type": "string" + } + } + }, + "inline_response_200_data": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/inline_response_200_data_user" + } + } + }, + "inline_response_200_5_data_user": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 1 + }, + "email": { + "type": "string", + "example": "user@example.com" + }, + "first_name": { + "type": "string", + "example": "John" + }, + "last_name": { + "type": "string", + "example": "Doe" + }, + "fullname": { + "type": "string", + "example": "John Doe" + }, + "role": { + "type": "string", + "example": "user" + } + } + }, + "inline_response_200_5_data": { + "type": "object", + "properties": { + "user": { + "$ref": "#/components/schemas/inline_response_200_5_data_user" + } + } + }, + "inline_response_200_6_data": { + "type": "object", + "properties": { + "id": { + "type": "string", + "example": "30e30ee3-61f5-4922-bf72-76b1f0145797" + }, + "email": { + "type": "string", + "example": "user@example.com" + }, + "first_name": { + "type": "string", + "example": "John" + }, + "last_name": { + "type": "string", + "example": "Doe" + } + } + }, + "inline_response_201_1_data": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "example": 1 + }, + "email": { + "type": "string", + "example": "john.doe@gmail.com" + }, + "first_name": { + "type": "string", + "example": "John" + }, + "last_name": { + "type": "string", + "example": "Doe" + } + } + } + }, + "responses": { + "RegisterationSuccessResponse": { + "description": "User created successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_201" + } + } + } + }, + "RegisterationErrorResponse": { + "description": "Validation or registration error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400" + } + } + } + }, + "LoginResponse": { + "description": "Login successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200" + } + } + } + }, + "LoginErrorInvalidCredentials": { + "description": "Invalid credentials provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401" + } + } + } + }, + "LoginErrorBadRequest": { + "description": "Bad request, validation errors", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_1" + } + } + } + }, + "LogoutSuccessResponse": { + "description": "Logout successful", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_1" + } + } + } + }, + "LogoutErrorResponse": { + "description": "Error during logout, e.g., token issues", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401_1" + } + } + } + }, + "ForgotPasswordSuccessResponse": { + "description": "Success response for forgot password request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_2" + } + } + } + }, + "ForgotPasswordErrorResponse": { + "description": "Error response for forgot password request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_2" + } + } + } + }, + "ForgotEmailPasswordValidationErrorResponse": { + "description": "Validation error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_422" + } + } + } + }, + "VerifyOtpSuccessResponse": { + "description": "Success response for OTP verification", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_3" + } + } + } + }, + "VerifyOtpErrorResponse": { + "description": "Invalid OTP or email response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_3" + } + } + } + }, + "InvalidTokenErrorResponse": { + "description": "Validation error response", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401_2" + } + } + } + }, + "ResetPasswordSuccessResponse": { + "description": "Password reset successfully", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_4" + } + } + } + }, + "ResetPasswordErrorResponse": { + "description": "Error response for password reset request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_4" + } + } + } + }, + "GoogleRedirectResponse": { + "description": "Redirects the user to Google for authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_302" + } + } + } + }, + "GoogleLoginSuccessResponse": { + "description": "Successful Google authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_6" + } + } + } + }, + "GoogleSuccessfulAuthentication": { + "description": "User successfully authenticated", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_201_1" + } + } + } + }, + "GoogleBadRequest": { + "description": "Bad request, invalid data provided", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_6" + } + } + } + }, + "GoogleUnauthorizedError": { + "description": "Unauthorized error, invalid credentials or missing data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_401_3" + } + } + } + }, + "FacebookRedirectResponse": { + "description": "Redirects to Facebook for authentication", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookRedirectResponse" + } + } + } + }, + "FacebookCallbackResponse": { + "description": "Successful authentication and token generation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookCallbackResponseSchema" + } + } + } + }, + "FacebookCallbackPostResponse": { + "description": "Successful authentication and token generation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FacebookCallbackPostResponseSchema" + } + } + } + }, + "BadRequestResponse": { + "description": "Bad request error due to invalid data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_7" + } + } + } + }, + "GoogleRequest200": { + "description": "Successful authentication and user creation", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_200_5" + } + } + } + }, + "GoogleRequest400": { + "description": "Bad request due to invalid token or mismatched email", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_400_5" + } + } + } + }, + "GoogleRequest422": { + "description": "Validation error for missing or invalid parameters", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_422_1" + } + } + } + }, + "GoogleRequest500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/inline_response_500" + } + } + } + } + }, + "requestBodies": { + "RegisterRequest": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "first_name", + "last_name", + "password" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Required email address", + "example": "john.doe@example.com" + }, + "first_name": { + "type": "string", + "description": "Required first name", + "example": "John" + }, + "last_name": { + "type": "string", + "description": "Required last name", + "example": "Doe" + }, + "password": { + "type": "string", + "description": "Required password with minimum 8 characters including letters, mixed case, numbers, and symbols", + "example": "P@ssw0rd123" + }, + "admin_secret": { + "type": "string", + "example": "" + } + } + } + } + }, + "required": true + }, + "LoginRequest": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "password" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address for login", + "example": "example@example.com" + }, + "password": { + "type": "string", + "description": "Password for login", + "example": "P@ssw0rd123" + } + } + } + } + }, + "required": true + }, + "ForgotPasswordRequest": { + "content": { + "application/json": { + "schema": { + "required": [ + "email" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address to send the password reset token", + "example": "example@example.com" + } + } + } + } + }, + "required": true + }, + "VerifyOtpRequest": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "token" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address associated with the OTP", + "example": "example@gmail.com" + }, + "token": { + "type": "string", + "description": "OTP token for verification", + "example": "123456" + } + } + } + } + }, + "required": true + }, + "ResetPasswordRequest": { + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "password" + ], + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "Email address of the user requesting the password reset", + "example": "example@gmail.com" + }, + "password": { + "type": "string", + "description": "New password for the user, must meet security requirements", + "example": "NewP@ssw0rd123" + } + } + } + } + }, + "required": true + }, + "GoogleUserRequest": { + "description": "Google user data to authenticate and create or update the user", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "google_user": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Google user ID", + "example": "1234567890" + }, + "email": { + "type": "string", + "description": "Email address from Google", + "example": "john.doe@gmail.com" + }, + "user": { + "type": "object", + "properties": { + "given_name": { + "type": "string", + "description": "Google user's given name", + "example": "John" + }, + "family_name": { + "type": "string", + "description": "Google user's family name", + "example": "Doe" + } + } + }, + "attributes": { + "type": "object", + "properties": { + "avatar_original": { + "type": "string", + "description": "URL of the Google user's avatar", + "example": "http://example.com/avatar.jpg" + } + } + } + } + } + } + } + } + } + }, + "FacebookUserRequest": { + "description": "The Facebook user data submitted to authenticate and create or update the user.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "facebook_user": { + "type": "object", + "properties": { + "email": { + "type": "string", + "example": "user@example.com" + }, + "id": { + "type": "string", + "example": "facebook_user_id" + }, + "name": { + "type": "string", + "example": "John Doe" + }, + "avatar": { + "type": "string", + "example": "https://example.com/avatar.jpg" + } + } + } + } + } + } + }, + "required": true + }, + "GoogleResponseProcess": { + "description": "The request payload for Google authentication.", + "content": { + "application/json": { + "schema": { + "required": [ + "email", + "token" + ], + "type": "object", + "properties": { + "token": { + "type": "string", + "description": "The Google access token received from the client.", + "example": "ya29.A0ARrdaM9o0NT1-..." + }, + "email": { + "type": "string", + "description": "The email associated with the Google token.", + "example": "user@example.com" + } + } + } + } + }, + "required": true + } + }, + "securitySchemes": { + "bearerAuth": { + "type": "http", + "scheme": "bearer", + "bearerFormat": "JWT" + } + } + } +} \ No newline at end of file diff --git a/resources/docs/docs.json b/resources/docs/docs.json index fc282d24..a621b138 100644 --- a/resources/docs/docs.json +++ b/resources/docs/docs.json @@ -1,95 +1,45 @@ { "openapi": "3.0.0", "info": { - "title": "PHP Laravel API Boilerplate", - "description": "API documentation for the boilerplate", - "version": "1.0.0" + "title": "Language Learning AI Game API", + "version": "1.0.0", + "description": "API documentation for the Language Learning AI Game" }, "servers": [ { - "url": "https://virtserver.swaggerhub.com/TULBADEX_1/HNG-Task-4/1.0.0", - "description": "SwaggerHub API Auto Mocking" + "url": "https://api.example.com/v1" }, { "url": "https://staging.api-php.boilerplate.hng.tech", "description": "Deployment server" - } - ], - "tags": [ - { - "name": "Authentication" - }, - { - "name": "Users" - }, - { - "name": "User Dashboard" - }, - { - "name": "Organisations" - }, - { - "name": "Testimonials" - }, - { - "name": "Jobs" - }, - { - "name": "Customers" - }, - { - "name": "Roles" - }, - { - "name": "Products" - }, - { - "name": "Articles" - }, - { - "name": "Contact" - }, - { - "name": "Blogs" - }, - { - "name": "Squeeze" - }, - { - "name": "Features" }, { - "name": "Plans" + "url": "http://127.0.0.1:8000", + "description": "local server" } ], "paths": { "/api/v1/auth/register": { "post": { - "tags": [ - "Authentication" - ], "summary": "Register a new user", - "description": "Endpoint to register a new user and return JWT token.", + "tags": ["Authentication"], "requestBody": { - "$ref": "#/components/requestBodies/RegisterRequest" - }, - "responses": { - "201": { - "description": "User created successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_201" - } + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RegisterRequest" } } - }, - "400": { - "description": "Validation or registration error", + } + }, + "responses": { + "200": { + "description": "Successful registration", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inline_response_400" + "$ref": "#/components/schemas/AuthResponse" } } } @@ -99,41 +49,25 @@ }, "/api/v1/auth/login": { "post": { - "tags": [ - "Authentication" - ], - "summary": "User login", - "description": "Endpoint for user login and returning an access token.", + "summary": "Login user", + "tags": ["Authentication"], "requestBody": { - "$ref": "#/components/requestBodies/LoginRequest" + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginRequest" + } + } + } }, "responses": { "200": { - "description": "Login successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200" - } - } - } - }, - "400": { - "description": "Bad request, validation errors", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_1" - } - } - } - }, - "401": { - "description": "Invalid credentials provided", + "description": "Successful login", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inline_response_401" + "$ref": "#/components/schemas/AuthResponse" } } } @@ -143,28 +77,25 @@ }, "/api/v1/auth/logout": { "post": { - "tags": [ - "Authentication" + "summary": "Logout user", + "tags": ["Authentication"], + "security": [ + { + "bearerAuth": [] + } ], - "summary": "Logout a user", - "description": "Endpoint to invalidate the user’s JWT token.", "responses": { "200": { - "description": "Logout successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_1" - } - } - } - }, - "401": { - "description": "Error during logout, e.g., token issues", + "description": "Successful logout", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inline_response_401_1" + "type": "object", + "properties": { + "message": { + "type": "string" + } + } } } } @@ -172,2433 +103,2328 @@ } } }, - "/api/v1/auth/forgot-password": { + "/api/v1/auth/password-reset-email": { "post": { - "tags": [ - "Authentication" - ], - "summary": "Request a password reset token", - "description": "Endpoint to request a password reset token by providing the user's email address.", + "summary": "Send password reset email", + "tags": ["Authentication"], "requestBody": { - "$ref": "#/components/requestBodies/ForgotPasswordRequest" - }, - "responses": { - "200": { - "description": "Success response for forgot password request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_2" - } - } - } - }, - "400": { - "description": "Error response for forgot password request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_2" - } - } - } - }, - "422": { - "description": "Validation error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_422" - } + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + } + }, + "required": ["email"] } } } - } - } - }, - "/api/v1/auth/verify-otp": { - "post": { - "tags": [ - "Authentication" - ], - "summary": "Verify OTP for password reset", - "description": "Endpoint to verify OTP (token) sent to the user for password reset.", - "requestBody": { - "$ref": "#/components/requestBodies/VerifyOtpRequest" }, "responses": { "200": { - "description": "Success response for OTP verification", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_3" - } - } - } - }, - "400": { - "description": "Invalid OTP or email response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_3" - } - } - } - }, - "401": { - "description": "Validation error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_401_2" - } - } - } + "description": "Password reset email sent successfully" } } } }, - "/api/v1/auth/reset-forgot-password": { + "/api/v1/auth/request-password-request/{token}": { "post": { - "tags": [ - "Authentication" + "summary": "Reset password with token", + "tags": ["Authentication"], + "parameters": [ + { + "name": "token", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } ], - "summary": "Reset password after OTP verification", - "description": "Endpoint to reset a user’s password after verifying the OTP.", "requestBody": { - "$ref": "#/components/requestBodies/ResetPasswordRequest" - }, - "responses": { - "200": { - "description": "Password reset successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_4" - } - } - } - }, - "400": { - "description": "Error response for password reset request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_4" - } + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "password": { + "type": "string", + "format": "password" + }, + "password_confirmation": { + "type": "string", + "format": "password" + } + }, + "required": ["password", "password_confirmation"] } } } - } - } - }, - "/api/v1/auth/google": { - "post": { - "tags": [ - "Authentication" - ], - "summary": "Authenticate a user using Google token", - "description": "This endpoint validates the provided Google token and email, creates or updates the user, and returns a JWT token upon successful authentication.", - "requestBody": { - "$ref": "#/components/requestBodies/GoogleResponseProcess" }, "responses": { "200": { - "description": "Successful authentication and user creation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_5" - } - } - } - }, - "400": { - "description": "Bad request due to invalid token or mismatched email", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_5" - } - } - } - }, - "422": { - "description": "Validation error for missing or invalid parameters", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_422_1" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_500" - } - } - } + "description": "Password reset successfully" } } } }, - "/api/v1/auth/login-google": { + "/api/v1/auth/google": { "get": { - "tags": [ - "Authentication" - ], "summary": "Redirect to Google for authentication", - "description": "This endpoint redirects the user to Google for authentication. It is intended to be accessed via a browser. This endpoint initiates the OAuth 2.0 authentication process with Google.", + "tags": ["Authentication"], "responses": { "302": { - "description": "Redirects the user to Google for authentication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_302" - } - } - } + "description": "Redirect to Google" } } } }, "/api/v1/auth/google/callback": { "get": { - "tags": [ - "Authentication" - ], "summary": "Handle Google authentication callback", - "description": "This endpoint is called by Google after successful authentication. It handles user data from Google, creates or updates a user in the database, and returns a JWT token for authentication.", + "tags": ["Authentication"], "responses": { "200": { - "description": "Successful Google authentication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_6" - } - } - } + "description": "Successful authentication with Google" } } }, "post": { - "tags": [ - "Authentication" - ], - "summary": "Save Google user data", - "description": "Alternative endpoint to handle Google authentication via POST when the redirect is not available. It updates or creates a user in the database and returns a JWT token for authentication.", - "requestBody": { - "$ref": "#/components/requestBodies/GoogleUserRequest" - }, + "summary": "Save Google authentication request", + "tags": ["Authentication"], "responses": { - "201": { - "description": "User successfully authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_201_1" - } - } - } - }, - "400": { - "description": "Bad request, invalid data provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_6" - } - } - } - }, - "401": { - "description": "Unauthorized error, invalid credentials or missing data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_401_3" - } - } - } + "200": { + "description": "Google authentication data saved successfully" } } } }, - "/api/v1/auth/login-facebook": { - "get": { - "tags": [ - "Authentication" - ], - "summary": "Redirect to Facebook for login", - "description": "Redirects the user to Facebook for authentication. This endpoint cannot be tested directly via Postman or documentation tools as it performs a redirect.", - "responses": { - "302": { - "description": "Redirects to Facebook for authentication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacebookRedirectResponse" - } + "/api/v1/auth/forgot-password": { + "post": { + "summary": "Forgot password", + "tags": ["Authentication"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + } + }, + "required": ["email"] } } } - } - } - }, - "/api/v1/auth/facebook/callback": { - "get": { - "tags": [ - "Authentication" - ], - "summary": "Handle Facebook callback and authenticate user", - "description": "This endpoint handles the callback from Facebook after successful authentication, updates or creates the user, and returns a JWT token.", - "responses": { - "200": { - "description": "Successful authentication and token generation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacebookCallbackResponseSchema" - } - } - } - } - } - }, - "post": { - "tags": [ - "Authentication" - ], - "summary": "Handle Facebook data submission and authenticate user", - "description": "This endpoint processes Facebook user data sent via POST request, updates or creates the user, and returns a JWT token. It is used as an alternative to the GET callback for cases where direct data processing is needed.", - "requestBody": { - "$ref": "#/components/requestBodies/FacebookUserRequest" }, - "responses": { - "201": { - "description": "Successful authentication and token generation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacebookCallbackPostResponseSchema" - } - } - } - }, - "400": { - "description": "Bad request error due to invalid data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_7" - } - } - } - } - } - } - }, - "/api/v1/user-analytics": { - "get": { - "tags": [ - "User Dashboard" - ], - "summary": "Revenue by months of the year", "responses": { "200": { - "description": "User Analytics", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UserAnalyticsResponse" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - }, - "500": { - "description": "An error occurred", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorResponse" - } - } - } - } - }, - "security": [ - { - "bearerAuth": [] + "description": "Password reset instructions sent" } - ] + } } }, - "/api/v1/payments/flutterwave": { + "/api/v1/auth/reset-forgot-password": { "post": { - "tags": [ - "Payments" - ], - "summary": "Initiate a payment using Flutterwave", - "description": "Allows authenticated users with appropriate permissions to initiate a payment through Flutterwave.", + "summary": "Reset forgotten password", + "tags": ["Authentication"], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentRequest" + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "format": "password" + }, + "password_confirmation": { + "type": "string", + "format": "password" + } + }, + "required": ["token", "email", "password", "password_confirmation"] } } - }, - "required": true + } }, "responses": { "200": { - "description": "Payment initiated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessResponse" - } - } - } - }, - "400": { - "description": "Validation error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "401": { - "description": "Authentication required", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthError" - } - } - } - }, - "403": { - "description": "Authorization error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthzError" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerError" - } - } - } - } - }, - "security": [ - { - "bearerAuth": [] + "description": "Password reset successfully" } - ] + } } }, - "/api/v1/payments/paystack": { + "/api/v1/auth/verify-otp": { "post": { - "tags": [ - "Payments" - ], - "summary": "Initiate a payment using Paystack", - "description": "Allows authenticated users with appropriate permissions to initiate a payment through Paystack.", + "summary": "Verify OTP", + "tags": ["Authentication"], "requestBody": { + "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PaymentRequest" + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "otp": { + "type": "string" + } + }, + "required": ["email", "otp"] } } - }, - "required": true + } }, "responses": { "200": { - "description": "Payment initiated successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SuccessResponse" - } - } - } - }, - "400": { - "description": "Validation error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ValidationError" - } - } - } - }, - "401": { - "description": "Authentication required", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthError" - } - } - } - }, - "403": { - "description": "Authorization error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/AuthzError" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServerError" - } - } - } + "description": "OTP verified successfully" } - }, - "security": [ - { - "bearerAuth": [] + } + } + }, + "/api/v1/auth/login-facebook": { + "get": { + "summary": "Login using Facebook", + "tags": ["Authentication"], + "responses": { + "302": { + "description": "Redirect to Facebook" } - ] + } } }, - "/languages": { + "/api/v1/auth/facebook/callback": { "get": { - "tags": [ - "Languages" - ], - "summary": "Get all supported languages", + "summary": "Handle Facebook authentication callback", + "tags": ["Authentication"], "responses": { "200": { - "description": "List of supported languages", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguagesListResponse" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedResponse" - } - } - } + "description": "Successful authentication with Facebook" } - }, + } + }, + "post": { + "summary": "Save Facebook authentication request", + "tags": ["Authentication"], + "responses": { + "200": { + "description": "Facebook authentication data saved successfully" + } + } + } + }, + "/api/v1/users/stats": { + "get": { + "summary": "Get user statistics", + "tags": ["Users"], "security": [ { "bearerAuth": [] } - ] - }, - "post": { - "tags": [ - "Languages" ], - "summary": "Create a new language", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLanguageRequest" - } - } - }, - "required": true - }, "responses": { - "201": { - "description": "Language Created Successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateLanguageResponse" - } - } - } - }, - "400": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguageValidationError" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedResponse" - } - } - } - }, - "409": { - "description": "Language already exists", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguageConflictError" - } - } - } + "200": { + "description": "User statistics retrieved successfully" } - }, + } + } + }, + "/api/v1/users": { + "get": { + "summary": "Get all users", + "tags": ["Users"], "security": [ { "bearerAuth": [] } - ] + ], + "responses": { + "200": { + "description": "List of users retrieved successfully" + } + } + } + }, + "/api/v1/jobs": { + "get": { + "summary": "Get all jobs", + "tags": ["Jobs"], + "responses": { + "200": { + "description": "List of jobs retrieved successfully" + } + } } }, - "/languages/{id}": { - "patch": { - "tags": [ - "Languages" - ], - "summary": "Update a language", + "/api/v1/jobs/search": { + "get": { + "summary": "Search jobs", + "tags": ["Jobs"], "parameters": [ { - "name": "id", - "in": "path", - "description": "Language ID", - "required": true, - "style": "simple", - "explode": false, + "name": "query", + "in": "query", "schema": { - "type": "string", - "example": "uuid" + "type": "string" } } ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLanguageRequest" - } - } - }, - "required": true - }, "responses": { "200": { - "description": "Language successfully updated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateLanguageResponse" - } - } - } - }, - "400": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguageValidationError" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UnauthorizedResponse" - } - } - } - }, - "404": { - "description": "Language not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LanguageNotFoundError" - } - } - } - } - }, - "security": [ - { - "bearerAuth": [] + "description": "Search results retrieved successfully" } - ] + } } }, - "/api/v1/billing-plans/{id}": { + "/api/v1/jobs/{id}": { "get": { - "tags": [ - "Billing Plans" - ], - "summary": "Retrieve a billing plan", - "description": "Fetch the details of a single billing plan.", - "operationId": "getBillingPlan", + "summary": "Get job details", + "tags": ["Jobs"], "parameters": [ { "name": "id", "in": "path", - "description": "The ID of the billing plan to retrieve", "required": true, - "style": "simple", - "explode": false, "schema": { - "type": "string" + "type": "uuid" } } ], "responses": { "200": { - "description": "Billing plan retrieved successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingPlanResponse" - } - } - } - }, - "400": { - "description": "Invalid billing plan ID", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingPlanErrorResponse" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingPlanErrorResponse" - } - } - } - }, - "404": { - "description": "Billing plan not found", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingPlanErrorResponse" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BillingPlanErrorResponse" - } - } - } + "description": "Job details retrieved successfully" } } } - } - }, - "components": { - "schemas": { - "FacebookRedirectResponse": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 302 - }, - "message": { - "type": "string", - "example": "Redirecting to Facebook for authentication" + }, + "/api/v1/products/categories": { + "get": { + "summary": "Get product categories", + "tags": ["Products"], + "responses": { + "200": { + "description": "Product categories retrieved successfully" } } - }, - "FacebookCallbackResponseSchema": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "User successfully authenticated" - }, - "access_token": { - "type": "string", - "example": "your_jwt_token_here" - }, - "data": { - "$ref": "#/components/schemas/FacebookCallbackResponseSchema_data" + } + }, + "/api/v1/products/search": { + "get": { + "summary": "Search products", + "tags": ["Products"], + "parameters": [ + { + "name": "query", + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Search results retrieved successfully" } } - }, - "FacebookCallbackPostResponseSchema": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 201 - }, - "message": { - "type": "string", - "example": "User successfully authenticated" - }, - "access_token": { - "type": "string", - "example": "your_jwt_token_here" - }, - "data": { - "$ref": "#/components/schemas/FacebookCallbackResponseSchema_data" + } + }, + "/api/v1/products": { + "get": { + "summary": "Get all products", + "tags": ["Products"], + "responses": { + "200": { + "description": "List of products retrieved successfully" } } - }, - "UserAnalyticsResponse": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "User analytics retrieved successfully" - }, - "status_code": { - "type": "integer", - "example": 200 - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserAnalyticsResponse_data" + } + }, + "/api/v1/products/{product_id}": { + "get": { + "summary": "Get product details", + "tags": ["Products"], + "parameters": [ + { + "name": "product_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" } } - } - }, - "PaymentRequest": { - "required": [ - "billing_option", - "full_name", - "organisation_id", - "plan_id", - "redirect_url" ], - "type": "object", - "properties": { - "organisation_id": { - "type": "string", - "description": "ID of the organisation making the payment" - }, - "plan_id": { - "type": "string", - "description": "ID of the plan being purchased" - }, - "full_name": { - "type": "string", - "description": "Full name of the payer" - }, - "billing_option": { - "type": "string", - "description": "Billing option for the payment", - "enum": [ - "monthly", - "yearly" - ] - }, - "redirect_url": { - "type": "string", - "description": "URL to redirect to after payment completion", - "format": "uri" + "responses": { + "200": { + "description": "Product details retrieved successfully" } } - }, - "SuccessResponse": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Payment initiated successfully" - }, - "data": { - "$ref": "#/components/schemas/SuccessResponse_data" + } + }, + "/api/v1/billing-plans": { + "get": { + "summary": "Get billing plans", + "tags": ["Billing"], + "responses": { + "200": { + "description": "Billing plans retrieved successfully" } } - }, - "ValidationError": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Validation error: amount must be a positive number" + } + }, + "/api/v1/billing-plans/{id}": { + "get": { + "summary": "Get billing plan details", + "tags": ["Billing"], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "AuthError": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 401 - }, - "message": { - "type": "string", - "example": "Authentication required" + ], + "responses": { + "200": { + "description": "Billing plan details retrieved successfully" } } - }, - "AuthzError": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 403 + } + }, + "/api/v1/payments/paystack/{organisation_id}/verify/{id}": { + "get": { + "summary": "Verify Paystack payment", + "tags": ["Payments"], + "parameters": [ + { + "name": "organisation_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } }, - "message": { - "type": "string", - "example": "You do not have permission to initiate this payment" + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Payment verified successfully" } } - }, - "ServerError": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 500 + } + }, + "/api/v1/payments/flutterwave/{organisation_id}/verify/{id}": { + "get": { + "summary": "Verify Flutterwave payment", + "tags": ["Payments"], + "parameters": [ + { + "name": "organisation_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } }, - "message": { - "type": "string", - "example": "An unexpected error occurred. Please try again later." + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Payment verified successfully" } } - }, - "ErrorResponse": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 500 - }, - "message": { - "type": "string", - "example": "Error message" + } + }, + "/api/v1/languages": { + "post": { + "summary": "Create a new language", + "tags": ["Languages"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + }, + "required": ["name", "code"] + } + } + } + }, + "responses": { + "201": { + "description": "Language created successfully" } } }, - "LanguagesListResponse": { - "required": [ - "languages", - "message", - "status" + "get": { + "summary": "Get all languages", + "tags": ["Languages"], + "responses": { + "200": { + "description": "Languages retrieved successfully" + } + } + } + }, + "/api/v1/languages/{id}": { + "put": { + "summary": "Update a language", + "tags": ["Languages"], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } + } ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Languages retrieved successfully" - }, - "languages": { - "type": "array", - "items": { - "$ref": "#/components/schemas/LanguagesListResponse_languages" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "code": { + "type": "string" + } + } + } } } + }, + "responses": { + "200": { + "description": "Language updated successfully" + } } - }, - "CreateLanguageRequest": { - "required": [ - "code", - "language" + } + }, + "/api/v1/topics/search": { + "get": { + "summary": "Search topics", + "tags": ["Topics"], + "parameters": [ + { + "name": "query", + "in": "query", + "schema": { + "type": "string" + } + } ], - "type": "object", - "properties": { - "language": { - "type": "string", - "example": "English" - }, - "code": { - "type": "string", - "example": "en" - }, - "description": { - "type": "string", - "example": "English Language" + "responses": { + "200": { + "description": "Search results retrieved successfully" } } - }, - "CreateLanguageResponse": { - "required": [ - "language", - "message", - "status" + } + }, + "/api/v1/organisations/{org_id}/products": { + "post": { + "summary": "Create a new product for an organisation", + "tags": ["Products"], + "security": [ + { + "bearerAuth": [] + } ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 201 - }, - "message": { - "type": "string", - "example": "Language Created Successfully" - }, - "language": { - "$ref": "#/components/schemas/LanguagesListResponse_languages" + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "UpdateLanguageRequest": { - "required": [ - "code", - "language" ], - "type": "object", - "properties": { - "language": { - "type": "string", - "example": "English" - }, - "code": { - "type": "string", - "example": "en" - }, - "description": { - "type": "string", - "example": "English Language" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Product created successfully" } } - }, - "UpdateLanguageResponse": { - "required": [ - "language", - "message", - "status" + } + }, + "/api/v1/organisations/{org_id}/products/{product_id}": { + "patch": { + "summary": "Update a product for an organisation", + "tags": ["Products"], + "security": [ + { + "bearerAuth": [] + } ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Language successfully updated" + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } }, - "language": { - "$ref": "#/components/schemas/LanguagesListResponse_languages" + { + "name": "product_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "LanguageValidationError": { - "required": [ - "message", - "status" ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Validation Error" - }, - "errors": { - "$ref": "#/components/schemas/LanguageValidationError_errors" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Product updated successfully" } } }, - "LanguageConflictError": { - "required": [ - "message", - "status" + "delete": { + "summary": "Delete a product for an organisation", + "tags": ["Products"], + "security": [ + { + "bearerAuth": [] + } ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 409 + "parameters": [ + { + "name": "org_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } }, - "message": { - "type": "string", - "example": "Language already exists" + { + "name": "product_id", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "LanguageNotFoundError": { - "required": [ - "message", - "status" ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 404 - }, - "message": { - "type": "string", - "example": "Language not found" + "responses": { + "200": { + "description": "Product deleted successfully" } } - }, - "UnauthorizedResponse": { - "required": [ - "message", - "status" + } + }, + "/api/v1/blogs/{blogId}/comments": { + "post": { + "summary": "Create a comment on a blog", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] + } ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 401 - }, - "message": { - "type": "string", - "example": "Unauthorized" + "parameters": [ + { + "name": "blogId", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "BillingPlanResponse": { - "required": [ - "data", - "message", - "status" ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Billing plan retrieved successfully" - }, - "data": { - "$ref": "#/components/schemas/BillingPlanResponse_data" + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + } + }, + "required": ["content"] + } + } + } + }, + "responses": { + "201": { + "description": "Comment created successfully" } } }, - "BillingPlanErrorResponse": { - "required": [ - "message", - "status" + "get": { + "summary": "Get comments for a blog", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] + } ], - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Error occurred" + "parameters": [ + { + "name": "blogId", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "inline_response_201": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 201 - }, - "message": { - "type": "string", - "example": "User Created Successfully" - }, - "token": { - "type": "string", - "example": "jwt_token_string" - }, - "data": { - "$ref": "#/components/schemas/inline_response_201_data" + ], + "responses": { + "200": { + "description": "Comments retrieved successfully" } } - }, - "inline_response_400": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Registration unsuccessful" + } + }, + "/api/v1/comments/{commentId}/reply": { + "post": { + "summary": "Reply to a comment", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] } - } - }, - "inline_response_200": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Login successful" - }, - "access_token": { - "type": "string", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjMwZTMwZWUzLTYxZjUtNDkyMi1iZjcyLTc2YjFmMDE0NTc5NyIsInN1YiI6IjMwZTMwZWUzLTYxZjUtNDkyMi1iZjcyLTc2YjFmMDE0NTc5NyIsImlhdCI6MTcyMjk3MzgxMiwiZXhwIjoxNzIyOTk1NDEyfQ.D8kt6U6Icctlyg78Y8FFIlIr96bwONQs5hN_sCO2SHc" - }, - "data": { - "$ref": "#/components/schemas/inline_response_200_data" + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "uuid" + } } - } - }, - "inline_response_401": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 401 - }, - "message": { - "type": "string", - "example": "Invalid credentials" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + } + }, + "required": ["content"] + } + } + } + }, + "responses": { + "201": { + "description": "Reply created successfully" } } - }, - "inline_response_400_1": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "array", - "example": [ - "password should not be empty" - ], - "items": { - "type": "string" + } + }, + "/api/v1/comments/{commentId}/like": { + "post": { + "summary": "Like a comment", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "uuid" } } - } - }, - "inline_response_200_1": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Logout successful" + ], + "responses": { + "200": { + "description": "Comment liked successfully" } } - }, - "inline_response_401_1": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 401 - }, - "message": { - "type": "string", - "example": "Invalid token or other error" - }, - "error": { - "type": "string", - "example": "Token invalidation error" + } + }, + "/api/v1/comments/{commentId}/dislike": { + "post": { + "summary": "Dislike a comment", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] } - } - }, - "inline_response_200_2": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Email sent successfully" + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } } - } - }, - "inline_response_400_2": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Account with the specified email doesn't exist" + ], + "responses": { + "200": { + "description": "Comment disliked successfully" } } - }, - "inline_response_422": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 422 - }, - "message": { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "example": { - "email": "The email field is required." + } + }, + "/api/v1/comments/edit/{commentId}": { + "patch": { + "summary": "Edit a comment", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } } - } - }, - "inline_response_200_3": { - "type": "object", - "properties": { - "message": { - "type": "string", - "example": "Token Validated Successfully" - }, - "status_code": { - "type": "integer", - "example": 200 + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string" + } + }, + "required": ["content"] + } + } + } + }, + "responses": { + "200": { + "description": "Comment updated successfully" } } - }, - "inline_response_400_3": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 401 - }, - "message": { - "type": "string", - "example": "Invalid token or email" + } + }, + "/api/v1/comments/{commentId}": { + "delete": { + "summary": "Delete a comment", + "tags": ["Comments"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "commentId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Comment deleted successfully" } } - }, - "inline_response_401_2": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "object", - "additionalProperties": { + } + }, + "/api/v1/help-center/topics/search": { + "get": { + "summary": "Search help center topics", + "tags": ["Help Center"], + "parameters": [ + { + "name": "query", + "in": "query", + "schema": { "type": "string" - }, - "example": { - "email": "The email field is required." } } - } - }, - "inline_response_200_4": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "Password reset successfully" + ], + "responses": { + "200": { + "description": "Search results retrieved successfully" } } - }, - "inline_response_400_4": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "User does not exist or validation errors occurred" + } + }, + "/api/v1/inquiries": { + "post": { + "summary": "Send an inquiry", + "tags": ["Inquiries"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "message": { + "type": "string" + } + }, + "required": ["name", "email", "message"] + } + } + } + }, + "responses": { + "201": { + "description": "Inquiry sent successfully" } } }, - "inline_response_200_5": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "User Created Successfully" - }, - "access_token": { - "type": "string", - "description": "JWT token for authenticated user.", - "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." - }, - "data": { - "$ref": "#/components/schemas/inline_response_200_5_data" + "get": { + "summary": "Get all inquiries", + "tags": ["Inquiries"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Inquiries retrieved successfully" } } - }, - "inline_response_400_5": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "error": { - "type": "string", - "example": "Bad Request" - }, - "message": { - "type": "string", - "example": "Invalid Google token" + } + }, + "/api/v1/blogs/latest": { + "get": { + "summary": "Get latest blogs", + "tags": ["Blogs"], + "responses": { + "200": { + "description": "Latest blogs retrieved successfully" } } - }, - "inline_response_422_1": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 422 - }, - "message": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } + } + }, + "/api/v1/blogs/search": { + "get": { + "summary": "Search blogs", + "tags": ["Blogs"], + "parameters": [ + { + "name": "query", + "in": "query", + "schema": { + "type": "string" } } - } - }, - "inline_response_500": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 500 - }, - "message": { - "type": "string", - "example": "Error message" + ], + "responses": { + "200": { + "description": "Search results retrieved successfully" } } - }, - "inline_response_302": { - "type": "object", - "properties": { - "status": { - "type": "string", - "description": "Indicates the user is being redirected to Google for authentication.", - "example": "Redirecting" + } + }, + "/api/v1/squeeze": { + "post": { + "summary": "Create a squeeze page", + "tags": ["Squeeze Pages"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": ["title", "content"] + } + } } - } - }, - "inline_response_200_6": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 200 - }, - "message": { - "type": "string", - "example": "User successfully authenticated" - }, - "access_token": { - "type": "string", - "example": "jwt_token_string" - }, - "data": { - "$ref": "#/components/schemas/inline_response_200_6_data" + }, + "responses": { + "201": { + "description": "Squeeze page created successfully" } } - }, - "inline_response_201_1": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 201 - }, - "message": { - "type": "string", - "example": "User successfully authenticated" - }, - "access_token": { - "type": "string", - "example": "jwt_token_string" - }, - "data": { - "$ref": "#/components/schemas/inline_response_201_1_data" + } + }, + "/api/v1/cookies/preferences": { + "post": { + "summary": "Update cookie preferences", + "tags": ["Cookies"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "preferences": { + "type": "object" + } + }, + "required": ["preferences"] + } + } } - } - }, - "inline_response_400_6": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Invalid data provided" + }, + "responses": { + "200": { + "description": "Cookie preferences updated successfully" } } }, - "inline_response_401_3": { - "type": "object", - "properties": { - "status_code": { - "type": "integer", - "example": 401 - }, - "message": { - "type": "string", - "example": "Unauthorized" + "get": { + "summary": "Get cookie preferences", + "tags": ["Cookies"], + "responses": { + "200": { + "description": "Cookie preferences retrieved successfully" } } - }, - "inline_response_400_7": { - "type": "object", - "properties": { - "status": { - "type": "integer", - "example": 400 - }, - "message": { - "type": "string", - "example": "Bad request" + } + }, + "/api/v1/help-center/topics": { + "post": { + "summary": "Create a help center topic", + "tags": ["Help Center"], + "security": [ + { + "bearerAuth": [] } - } - }, - "FacebookCallbackResponseSchema_data": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "example": 1 - }, - "email": { - "type": "string", - "example": "user@example.com" - }, - "first_name": { - "type": "string", - "example": "John" - }, - "last_name": { - "type": "string", - "example": "Doe" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + }, + "required": ["title", "content"] + } + } } - } - }, - "UserAnalyticsResponse_data": { - "type": "object", - "properties": { - "jan": { - "type": "string", - "example": "1000" - }, - "feb": { - "type": "string", - "example": "10000" - }, - "mar": { - "type": "string", - "example": "1000" - }, - "apr": { - "type": "string", - "example": "10000" - }, - "may": { - "type": "string", - "example": "1000" - }, - "jun": { - "type": "string", - "example": "500" - }, - "jul": { - "type": "string", - "example": "5000" - }, - "aug": { - "type": "string", - "example": "1000" - }, - "sep": { - "type": "string", - "example": "10" - }, - "oct": { - "type": "string", - "example": "12000" - }, - "nov": { - "type": "string", - "example": "11000" - }, - "dec": { - "type": "string", - "example": "5000" + }, + "responses": { + "201": { + "description": "Help center topic created successfully" } } }, - "SuccessResponse_data": { - "type": "object", - "properties": { - "payment_url": { - "type": "string", - "example": "https://example.com/checkout?paymentId=pay_abc123" + "get": { + "summary": "Get all help center topics", + "tags": ["Help Center"], + "responses": { + "200": { + "description": "Help center topics retrieved successfully" } } - }, - "LanguagesListResponse_languages": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "uuid" - }, - "language": { - "type": "string", - "example": "English" - }, - "code": { - "type": "string", - "example": "en" - }, - "description": { - "type": "string", - "example": "English Language" + } + }, + "/api/v1/help-center/topics/{articleId}": { + "patch": { + "summary": "Update a help center topic", + "tags": ["Help Center"], + "security": [ + { + "bearerAuth": [] } - } - }, - "LanguageValidationError_errors": { - "type": "object", - "properties": { - "language": { - "type": "array", - "example": [ - "The language field is required." - ], - "items": { - "type": "string" + ], + "parameters": [ + { + "name": "articleId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "code": { - "type": "array", - "example": [ - "The code field is required." - ], - "items": { - "type": "string" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "content": { + "type": "string" + } + } + } } } + }, + "responses": { + "200": { + "description": "Help center topic updated successfully" + } } }, - "BillingPlanResponse_data": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "123e4567-e89b-12d3-a456-426614174000" - }, - "name": { - "type": "string", - "example": "Premium Plan" - }, - "price": { - "type": "number", - "format": "float", - "example": 49.99 - }, - "features": { - "type": "array", - "example": [ - "Feature 1", - "Feature 2", - "Feature 3" - ], - "items": { - "type": "string" + "delete": { + "summary": "Delete a help center topic", + "tags": ["Help Center"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "articleId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" } - }, - "description": { - "type": "string", - "example": "A comprehensive plan for premium users" + } + ], + "responses": { + "200": { + "description": "Help center topic deleted successfully" } } - }, - "inline_response_201_data_user": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "example": 1 - }, - "first_name": { - "type": "string", - "example": "John" - }, - "last_name": { - "type": "string", - "example": "Doe" - }, - "email": { - "type": "string", - "example": "john.doe@example.com" - }, - "avatar_url": { - "type": "string", - "example": "http://example.com/avatar.jpg" - }, - "role": { - "type": "string", - "example": "user" + } + }, + "/api/v1/products": { + "post": { + "summary": "Create a new product", + "tags": ["Products"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Product created successfully" + } + } + } + }, + "/api/v1/products/{productId}": { + "patch": { + "summary": "Update a product", + "tags": ["Products"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Product updated successfully" } } }, - "inline_response_201_data": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/inline_response_201_data_user" + "delete": { + "summary": "Delete a product", + "tags": ["Products"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "productId", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Product deleted successfully" + } + } + } + }, + "/api/v1/squeeze-pages-users": { + "get": { + "summary": "Get all squeeze page users", + "tags": ["Squeeze Pages"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Squeeze page users retrieved successfully" + } + } + } + }, + "/api/v1/email-templates": { + "get": { + "summary": "Get all email templates", + "tags": ["Email Templates"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Email templates retrieved successfully" } } }, - "inline_response_200_data_user": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "30e30ee3-61f5-4922-bf72-76b1f0145797" - }, - "first_name": { - "type": "string", - "example": "string" - }, - "last_name": { - "type": "string", - "example": "string" - }, - "email": { - "type": "string", - "example": "tulbadex@gmail.com" - }, - "role": { - "type": "string", - "example": "super-admin" - }, - "avatar_url": { - "type": "string" + "post": { + "summary": "Create a new email template", + "tags": ["Email Templates"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Email template created successfully" + } + } + } + }, + "/api/v1/email-templates/{id}": { + "patch": { + "summary": "Update an email template", + "tags": ["Email Templates"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailTemplateRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Email template updated successfully" } } }, - "inline_response_200_data": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/inline_response_200_data_user" + "delete": { + "summary": "Delete an email template", + "tags": ["Email Templates"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "Email template deleted successfully" + } + } + } + }, + "/api/v1/users-list": { + "get": { + "summary": "Get list of users", + "tags": ["Admin"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Users list retrieved successfully" + } + } + } + }, + "/api/v1/email-requests": { + "post": { + "summary": "Create an email request", + "tags": ["Email"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailRequestCreate" + } + } + } + }, + "responses": { + "201": { + "description": "Email request created successfully" + } + } + } + }, + "/api/v1/invitations/generate": { + "post": { + "summary": "Generate an invitation", + "tags": ["Invitations"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvitationGenerate" + } + } + } + }, + "responses": { + "201": { + "description": "Invitation generated successfully" + } + } + } + }, + "/api/v1/invite/accept": { + "get": { + "summary": "Accept an invitation", + "tags": ["Invitations"], + "parameters": [ + { + "name": "token", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Invitation accepted successfully" + } + } + } + }, + "/api/v1/invite": { + "post": { + "summary": "Accept an invitation (POST method)", + "tags": ["Invitations"], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InvitationAccept" + } + } + } + }, + "responses": { + "200": { + "description": "Invitation accepted successfully" + } + } + } + }, + "/api/v1/faqs": { + "get": { + "summary": "Get all FAQs", + "tags": ["FAQs"], + "responses": { + "200": { + "description": "FAQs retrieved successfully" } } }, - "inline_response_200_5_data_user": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "example": 1 - }, - "email": { - "type": "string", - "example": "user@example.com" - }, - "first_name": { - "type": "string", - "example": "John" - }, - "last_name": { - "type": "string", - "example": "Doe" - }, - "fullname": { - "type": "string", - "example": "John Doe" - }, - "role": { - "type": "string", - "example": "user" + "post": { + "summary": "Create a new FAQ", + "tags": ["FAQs"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FAQRequest" + } + } + } + }, + "responses": { + "201": { + "description": "FAQ created successfully" + } + } + } + }, + "/api/v1/faqs/{id}": { + "get": { + "summary": "Get a specific FAQ", + "tags": ["FAQs"], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "FAQ retrieved successfully" } } }, - "inline_response_200_5_data": { - "type": "object", - "properties": { - "user": { - "$ref": "#/components/schemas/inline_response_200_5_data_user" + "put": { + "summary": "Update a FAQ", + "tags": ["FAQs"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FAQRequest" + } + } + } + }, + "responses": { + "200": { + "description": "FAQ updated successfully" } } }, - "inline_response_200_6_data": { - "type": "object", - "properties": { - "id": { - "type": "string", - "example": "30e30ee3-61f5-4922-bf72-76b1f0145797" - }, - "email": { - "type": "string", - "example": "user@example.com" - }, - "first_name": { - "type": "string", - "example": "John" - }, - "last_name": { - "type": "string", - "example": "Doe" + "delete": { + "summary": "Delete a FAQ", + "tags": ["FAQs"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "schema": { + "type": "string", + "format": "uuid" + } + } + ], + "responses": { + "200": { + "description": "FAQ deleted successfully" + } + } + } + }, + "/api/v1/blogs": { + "get": { + "summary": "Get all blogs", + "tags": ["Blogs"], + "responses": { + "200": { + "description": "Blogs retrieved successfully" } } }, - "inline_response_201_1_data": { - "type": "object", - "properties": { - "id": { - "type": "integer", - "example": 1 - }, - "email": { - "type": "string", - "example": "john.doe@gmail.com" - }, - "first_name": { - "type": "string", - "example": "John" - }, - "last_name": { - "type": "string", - "example": "Doe" + "post": { + "summary": "Create a new blog", + "tags": ["Blogs"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlogRequest" + } + } + } + }, + "responses": { + "201": { + "description": "Blog created successfully" } } } }, - "responses": { - "RegisterationSuccessResponse": { - "description": "User created successfully", - "content": { - "application/json": { + "/api/v1/blogs/{id}": { + "get": { + "summary": "Get a specific blog", + "tags": ["Blogs"], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_201" + "type": "string", + "format": "uuid" } } + ], + "responses": { + "200": { + "description": "Blog retrieved successfully" + } } }, - "RegisterationErrorResponse": { - "description": "Validation or registration error", - "content": { - "application/json": { + "patch": { + "summary": "Update a blog", + "tags": ["Blogs"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_400" + "type": "string", + "format": "uuid" } } - } - }, - "LoginResponse": { - "description": "Login successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BlogRequest" + } } } + }, + "responses": { + "200": { + "description": "Blog updated successfully" + } } }, - "LoginErrorInvalidCredentials": { - "description": "Invalid credentials provided", - "content": { - "application/json": { + "delete": { + "summary": "Delete a blog", + "tags": ["Blogs"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_401" + "type": "string", + "format": "uuid" } } + ], + "responses": { + "200": { + "description": "Blog deleted successfully" + } } - }, - "LoginErrorBadRequest": { - "description": "Bad request, validation errors", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_1" - } + } + }, + "/api/v1/categories": { + "get": { + "summary": "Get all categories", + "tags": ["Categories"], + "responses": { + "200": { + "description": "Categories retrieved successfully" } } }, - "LogoutSuccessResponse": { - "description": "Logout successful", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_1" + "post": { + "summary": "Create a new category", + "tags": ["Categories"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CategoryRequest" + } } } + }, + "responses": { + "201": { + "description": "Category created successfully" + } } - }, - "LogoutErrorResponse": { - "description": "Error during logout, e.g., token issues", - "content": { - "application/json": { + } + }, + "/api/v1/categories/{id}": { + "get": { + "summary": "Get a specific category", + "tags": ["Categories"], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_401_1" + "type": "string", + "format": "uuid" } } + ], + "responses": { + "200": { + "description": "Category retrieved successfully" + } } }, - "ForgotPasswordSuccessResponse": { - "description": "Success response for forgot password request", - "content": { - "application/json": { + "put": { + "summary": "Update a category", + "tags": ["Categories"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_200_2" + "type": "string", + "format": "uuid" } } - } - }, - "ForgotPasswordErrorResponse": { - "description": "Error response for forgot password request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_2" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CategoryRequest" + } } } + }, + "responses": { + "200": { + "description": "Category updated successfully" + } } }, - "ForgotEmailPasswordValidationErrorResponse": { - "description": "Validation error response", - "content": { - "application/json": { + "delete": { + "summary": "Delete a category", + "tags": ["Categories"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_422" + "type": "string", + "format": "uuid" } } + ], + "responses": { + "200": { + "description": "Category deleted successfully" + } } - }, - "VerifyOtpSuccessResponse": { - "description": "Success response for OTP verification", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_3" - } + } + }, + "/api/v1/notifications": { + "get": { + "summary": "Get user notifications", + "tags": ["Notifications"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Notifications retrieved successfully" } } - }, - "VerifyOtpErrorResponse": { - "description": "Invalid OTP or email response", - "content": { - "application/json": { + } + }, + "/api/v1/notifications/{id}/mark-as-read": { + "post": { + "summary": "Mark a notification as read", + "tags": ["Notifications"], + "security": [ + { + "bearerAuth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, "schema": { - "$ref": "#/components/schemas/inline_response_400_3" + "type": "string", + "format": "uuid" } } + ], + "responses": { + "200": { + "description": "Notification marked as read successfully" + } } - }, - "InvalidTokenErrorResponse": { - "description": "Validation error response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_401_2" - } + } + }, + "/api/v1/notifications/mark-all-as-read": { + "post": { + "summary": "Mark all notifications as read", + "tags": ["Notifications"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "All notifications marked as read successfully" } } - }, - "ResetPasswordSuccessResponse": { - "description": "Password reset successfully", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_4" - } + } + }, + "/api/v1/user/profile": { + "get": { + "summary": "Get user profile", + "tags": ["User"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "User profile retrieved successfully" } } }, - "ResetPasswordErrorResponse": { - "description": "Error response for password reset request", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_4" + "put": { + "summary": "Update user profile", + "tags": ["User"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserProfileUpdate" + } } } + }, + "responses": { + "200": { + "description": "User profile updated successfully" + } } - }, - "GoogleRedirectResponse": { - "description": "Redirects the user to Google for authentication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_302" + } + }, + "/api/v1/user/change-password": { + "post": { + "summary": "Change user password", + "tags": ["User"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ChangePasswordRequest" + } } } + }, + "responses": { + "200": { + "description": "Password changed successfully" + } + } + } + }, + "/api/v1/user/delete-account": { + "delete": { + "summary": "Delete user account", + "tags": ["User"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "Account deleted successfully" + } + } + } + }, + "/api/v1/settings": { + "get": { + "summary": "Get user settings", + "tags": ["Settings"], + "security": [ + { + "bearerAuth": [] + } + ], + "responses": { + "200": { + "description": "User settings retrieved successfully" + } } }, - "GoogleLoginSuccessResponse": { - "description": "Successful Google authentication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_6" + "put": { + "summary": "Update user settings", + "tags": ["Settings"], + "security": [ + { + "bearerAuth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UserSettingsUpdate" + } } } - } - }, - "GoogleSuccessfulAuthentication": { - "description": "User successfully authenticated", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_201_1" - } + }, + "responses": { + "200": { + "description": "User settings updated successfully" } } - }, - "GoogleBadRequest": { - "description": "Bad request, invalid data provided", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_6" - } + } + }, + "/api/v1/feedback": { + "post": { + "summary": "Submit user feedback", + "tags": ["Feedback"], + "security": [ + { + "bearerAuth": [] } - } - }, - "GoogleUnauthorizedError": { - "description": "Unauthorized error, invalid credentials or missing data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_401_3" + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FeedbackSubmission" + } } } - } - }, - "FacebookRedirectResponse": { - "description": "Redirects to Facebook for authentication", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacebookRedirectResponse" - } + }, + "responses": { + "201": { + "description": "Feedback submitted successfully" } } - }, - "FacebookCallbackResponse": { - "description": "Successful authentication and token generation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacebookCallbackResponseSchema" - } + } + } + }, + "components": { + "schemas": { + "RegisterRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "format": "password" } - } + }, + "required": ["name", "email", "password"] }, - "FacebookCallbackPostResponse": { - "description": "Successful authentication and token generation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FacebookCallbackPostResponseSchema" - } + "LoginRequest": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "password": { + "type": "string", + "format": "password" } - } + }, + "required": ["email", "password"] }, - "BadRequestResponse": { - "description": "Bad request error due to invalid data", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_7" - } + "AuthResponse": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "user": { + "$ref": "#/components/schemas/User" } } }, - "GoogleRequest200": { - "description": "Successful authentication and user creation", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_200_5" - } + "User": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" } } }, - "GoogleRequest400": { - "description": "Bad request due to invalid token or mismatched email", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_400_5" - } + "ProductRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "price": { + "type": "number", + "format": "float" + }, + "category_id": { + "type": "string", + "format": "uuid" } - } + }, + "required": ["name", "description", "price", "category_id"] }, - "GoogleRequest422": { - "description": "Validation error for missing or invalid parameters", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_422_1" - } + "EmailTemplateRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "body": { + "type": "string" } - } + }, + "required": ["name", "subject", "body"] }, - "GoogleRequest500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/inline_response_500" - } + "EmailRequestCreate": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "subject": { + "type": "string" + }, + "message": { + "type": "string" } - } - } - }, - "requestBodies": { - "RegisterRequest": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "first_name", - "last_name", - "password" - ], - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Required email address", - "example": "john.doe@example.com" - }, - "first_name": { - "type": "string", - "description": "Required first name", - "example": "John" - }, - "last_name": { - "type": "string", - "description": "Required last name", - "example": "Doe" - }, - "password": { - "type": "string", - "description": "Required password with minimum 8 characters including letters, mixed case, numbers, and symbols", - "example": "P@ssw0rd123" - }, - "admin_secret": { - "type": "string", - "example": "" - } - } - } + }, + "required": ["email", "subject", "message"] + }, + "InvitationGenerate": { + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email" + }, + "role": { + "type": "string", + "enum": ["admin", "user"] } }, - "required": true + "required": ["email", "role"] }, - "LoginRequest": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "password" - ], - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address for login", - "example": "example@example.com" - }, - "password": { - "type": "string", - "description": "Password for login", - "example": "P@ssw0rd123" - } - } - } + "InvitationAccept": { + "type": "object", + "properties": { + "token": { + "type": "string" + }, + "name": { + "type": "string" + }, + "password": { + "type": "string", + "format": "password" + }, + "password_confirmation": { + "type": "string", + "format": "password" } }, - "required": true + "required": ["token", "name", "password", "password_confirmation"] }, - "ForgotPasswordRequest": { - "content": { - "application/json": { - "schema": { - "required": [ - "email" - ], - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address to send the password reset token", - "example": "example@example.com" - } - } - } + "FAQRequest": { + "type": "object", + "properties": { + "question": { + "type": "string" + }, + "answer": { + "type": "string" + }, + "category_id": { + "type": "string", + "format": "uuid" } }, - "required": true + "required": ["question", "answer", "category_id"] }, - "VerifyOtpRequest": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "token" - ], - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address associated with the OTP", - "example": "example@gmail.com" - }, - "token": { - "type": "string", - "description": "OTP token for verification", - "example": "123456" - } - } + "BlogRequest": { + "type": "object", + "properties": { + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "category_id": { + "type": "string", + "format": "uuid" + }, + "tags": { + "type": "array", + "items": { + "type": "string" } } }, - "required": true + "required": ["title", "content", "category_id"] }, - "ResetPasswordRequest": { - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "password" - ], - "type": "object", - "properties": { - "email": { - "type": "string", - "description": "Email address of the user requesting the password reset", - "example": "example@gmail.com" - }, - "password": { - "type": "string", - "description": "New password for the user, must meet security requirements", - "example": "NewP@ssw0rd123" - } - } - } + "CategoryRequest": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "parent_id": { + "type": "string", + "format": "uuid", + "nullable": true } }, - "required": true + "required": ["name"] }, - "GoogleUserRequest": { - "description": "Google user data to authenticate and create or update the user", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "google_user": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Google user ID", - "example": "1234567890" - }, - "email": { - "type": "string", - "description": "Email address from Google", - "example": "john.doe@gmail.com" - }, - "user": { - "type": "object", - "properties": { - "given_name": { - "type": "string", - "description": "Google user's given name", - "example": "John" - }, - "family_name": { - "type": "string", - "description": "Google user's family name", - "example": "Doe" - } - } - }, - "attributes": { - "type": "object", - "properties": { - "avatar_original": { - "type": "string", - "description": "URL of the Google user's avatar", - "example": "http://example.com/avatar.jpg" - } - } - } - } - } - } - } + "UserProfileUpdate": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "email": { + "type": "string", + "format": "email" + }, + "avatar": { + "type": "string", + "format": "binary" } } }, - "FacebookUserRequest": { - "description": "The Facebook user data submitted to authenticate and create or update the user.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "facebook_user": { - "type": "object", - "properties": { - "email": { - "type": "string", - "example": "user@example.com" - }, - "id": { - "type": "string", - "example": "facebook_user_id" - }, - "name": { - "type": "string", - "example": "John Doe" - }, - "avatar": { - "type": "string", - "example": "https://example.com/avatar.jpg" - } - } - } - } - } + "ChangePasswordRequest": { + "type": "object", + "properties": { + "current_password": { + "type": "string", + "format": "password" + }, + "new_password": { + "type": "string", + "format": "password" + }, + "new_password_confirmation": { + "type": "string", + "format": "password" } }, - "required": true + "required": ["current_password", "new_password", "new_password_confirmation"] }, - "GoogleResponseProcess": { - "description": "The request payload for Google authentication.", - "content": { - "application/json": { - "schema": { - "required": [ - "email", - "token" - ], - "type": "object", - "properties": { - "token": { - "type": "string", - "description": "The Google access token received from the client.", - "example": "ya29.A0ARrdaM9o0NT1-..." - }, - "email": { - "type": "string", - "description": "The email associated with the Google token.", - "example": "user@example.com" - } - } - } + "UserSettingsUpdate": { + "type": "object", + "properties": { + "language": { + "type": "string" + }, + "timezone": { + "type": "string" + }, + "notifications_enabled": { + "type": "boolean" + } + } + }, + "FeedbackSubmission": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["bug", "feature_request", "general"] + }, + "content": { + "type": "string" + }, + "rating": { + "type": "integer", + "minimum": 1, + "maximum": 5 } }, - "required": true + "required": ["type", "content"] } }, "securitySchemes": { @@ -2609,4 +2435,4 @@ } } } -} \ No newline at end of file +}