Skip to content

Create Portfolio REST API Endpoints - #382

Open
SugaretaNajja wants to merge 1 commit into
StellAIverse:mainfrom
SugaretaNajja:Create-Portfolio-REST-API-Endpoints
Open

Create Portfolio REST API Endpoints#382
SugaretaNajja wants to merge 1 commit into
StellAIverse:mainfrom
SugaretaNajja:Create-Portfolio-REST-API-Endpoints

Conversation

@SugaretaNajja

Copy link
Copy Markdown

Summary

This PR implements the Portfolio REST API endpoints for creating, retrieving, updating, listing, and archiving user portfolios.

The implementation follows the existing API conventions and OpenAPI/Swagger standards, with DTO-based input validation, consistent response formats, and proper HTTP status codes and error handling.

Changes Made

  • Added POST /api/portfolio to create a portfolio.
  • Added GET /api/portfolio/:id to retrieve a specific portfolio.
  • Added GET /api/portfolio to list portfolios belonging to the user.
  • Added PUT /api/portfolio/:id to update an existing portfolio.
  • Added DELETE /api/portfolio/:id to archive a portfolio.
  • Added DTOs for request validation.
  • Implemented standardized error responses.
  • Added appropriate HTTP status codes for success and failure scenarios.
  • Added Swagger/OpenAPI documentation for all portfolio endpoints.
  • Added E2E coverage for the portfolio API.
  • Added tests for validation and error scenarios.
  • Added load testing to verify the target of 100 requests/second per portfolio.

HTTP Status Codes

  • 201 Created — Portfolio successfully created.
  • 200 OK — Successful retrieval, update, or listing.
  • 400 Bad Request — Invalid request or validation failure.
  • 404 Not Found — Portfolio does not exist.
  • 500 Internal Server Error — Unexpected server error.

Testing

  • E2E tests for all portfolio endpoints.
  • Validation and error scenario tests.
  • Load testing against the required performance target.

Closes #324

Create Portfolio REST API Endpoints
@devIKargi

Copy link
Copy Markdown
Contributor

@SugaretaNajja fix the CI please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Portfolio REST API Endpoints

2 participants