The purpose of this task is to develop a set of CRUD APIs for our core data models using FastAPI. This will enable the front-end to perform basic data operations through a RESTful interface.
Scope:
Implement API endpoints for each of the basic database models.
Ensure that the APIs support all CRUD operations: creating new records, reading existing ones, updating records, and deleting them.
API Endpoints to Implement:
POST /users/: Create a new user.
GET /users/{user_id}: Read user details by ID.
PUT /users/{user_id}: Update user details by ID.
DELETE /users/{user_id}: Delete a user by ID.
Similarly, endpoints will be defined for Group and Bill models.
Requirements:
Each endpoint should validate input data for type and constraints.
Implement path and query parameters where applicable.
Utilize FastAPI's dependency injection system for common tasks like DB session management.
Apply proper HTTP status codes for all responses.
Secure endpoints as necessary, e.g., using OAuth2 with Password (and hashing), including JWT tokens.
Expected Outcome:
A fully functional API layer that can be tested with tools like Swagger UI or Postman. The API will allow our front-end team to begin integrating with the backend immediately.
Description:
The purpose of this task is to develop a set of CRUD APIs for our core data models using FastAPI. This will enable the front-end to perform basic data operations through a RESTful interface.
Scope:
Implement API endpoints for each of the basic database models. Ensure that the APIs support all CRUD operations: creating new records, reading existing ones, updating records, and deleting them.
API Endpoints to Implement:
Group
andBill
models.Requirements:
Expected Outcome:
A fully functional API layer that can be tested with tools like Swagger UI or Postman. The API will allow our front-end team to begin integrating with the backend immediately.