Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Create Feature Request API Endpoint #1191

Open
DanielleBadobre opened this issue Mar 1, 2025 · 1 comment
Open

[Feat] Create Feature Request API Endpoint #1191

DanielleBadobre opened this issue Mar 1, 2025 · 1 comment
Labels

Comments

@DanielleBadobre
Copy link

Description

Add a new Feature Request API to allow users to submit feature requests for the application. This endpoint will collect feature request details, including title, description, priority, and user information.

Proposed Changes

Endpoint Details

  • Method: POST
  • URL: /api/v1/feature-request

Request Body

{
  "title": "string",
  "description": "string",
  "requested_by": "[email protected]",
  "priority": "Low | Medium | High"
}

Response

Success (201 Created):

{
  "status": "success",
  "status_code": 201,
  "message": "Feature request submitted successfully",
  "data": {
    "title": "New Feature Title",
    "description": "Feature description",
    "requested_by": "[email protected]",
    "priority": "Medium",
    "status": "Pending",
    "created_at": "2025-03-01T10:00:00"
  }
}

Error Responses

  • 400 BAD REQUEST
{
  "status": "failure",
  "status_code": 400,
  "message": "Invalid request data"
}
  • 500 INTERNAL SERVER ERROR
{
  "status": "error",
  "status_code": 500,
  "message": "An unexpected error occurred"
}

Authentication and Authorization

  • The endpoint requires authentication.
  • All authenticated users can submit feature requests.

Acceptance Criteria

Endpoint Implementation:

  • The POST /api/v1/feature-request endpoint is implemented and functional.
  • Request body validation ensures that required fields are provided.
  • The endpoint saves feature request data to the database.

Authentication and Authorization:

  • Only authenticated users can submit feature requests.

Error Handling:

  • Handles missing or invalid request data.
  • Returns appropriate status codes and error messages.

Testing:

  • Unit tests cover:
    • Successful submissions
    • Invalid request data
    • Internal server errors

Documentation:

  • The endpoint is documented in the API documentation (e.g., Swagger/OpenAPI).
  • Example requests and responses are provided.
@DanielleBadobre
Copy link
Author

@joboy-dev please, I need the approval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants