You are a developer tasked with designing an application using the provided swagger.json file as the starting point.
The project is a RESTful API that provides CRUD operations for a list of students.
- Open the
swagger.jsonfile located in this directory. - Review the API endpoints, request parameters, and response schemas defined in the file.
- Use GitHub Copilot to generate the API endpoints defined in the
swagger.jsonfile. - Ensure that the generated endpoints match the specifications in the
swagger.jsonfile.
- Create a new Python project using Flask or FastAPI.
- Implement the API endpoints using the generated code from GitHub Copilot.
- Ensure that the endpoints handle the request parameters and return the appropriate response schemas.
- Implement in-memory storage to store the student data.
- Create a simple data structure (e.g., a list or dictionary) to hold the student data.
- Update the existing add endpoint to save the student data to the in-memory storage.
- Update the existing get endpoint to retrieve the student data from the in-memory storage.
- Update the existing update endpoint to update the student data in the in-memory storage.
- Update the existing delete endpoint to delete the student data from the in-memory storage.
- Write unit tests for each API endpoint to ensure they work as expected.
- Use GitHub Copilot to help generate the tests.
- Ensure that all tests 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
swagger.jsonfile are implemented. - The API endpoints use in-memory storage for simplicity.
- Unit tests are written and passing for all API endpoints.
- Documentation for the API endpoints is generated and accurate.