You are a developer tasked with designing an application using the provided app.py file as the starting point.
The project is a RESTful API that provides CRUD operations for a list of students, using a SQLite database for storage.
- Open the
app.pyfile located in this directory. - Review the existing API endpoints and their implementations.
- Ensure that SQLite is installed on your system.
- Review the
init_dbfunction inapp.pyto understand how the database is initialized. - Run the
app.pyfile to initialize the database.
- Use GitHub Copilot to help implement any missing API endpoints in
app.py. - Ensure that the endpoints handle the request parameters and return the appropriate response schemas.
- Ensure that the API endpoints interact with the SQLite database using SQLAlchemy.
- Create a new database model class for the
Studententity if not already present.
- Update the existing add endpoint to save the student data to the database.
- Update the existing get endpoint to retrieve the student data from the database.
- Update the existing update endpoint to update the student data in the database.
- Update the existing delete endpoint to delete the student data from the database.
- Review the
test_app.pyfile located in this directory. - Ensure that the tests cover all API endpoints.
- Use GitHub Copilot to help generate any missing tests.
- Run the tests to ensure they are passing.
- Use GitHub Copilot to generate documentation for the API endpoints.
- Ensure that the documentation includes details about the request parameters and response schemas.
- All API endpoints defined in the
app.pyfile are implemented. - The API endpoints interact with a SQLite database using SQLAlchemy.
- Unit tests are written and passing for all API endpoints.
- Documentation for the API endpoints is generated and accurate.