restful api implementation - GoJamie/PWP GitHub Wiki

Important information for Deadline 4

‼️  This chapter should be completed by Deadline 4 (see course information at Lovelace)


📑  Chapter summary In this section you must implement the RESTful API designed in the previous section. The minimum requirements are summarized in the Minimum Requirements section of the Project Work Assignment. If you do not meet the minimum requirements this section WILL NOT be evaluated.

CHAPTER GOALS

  • Implement a RESTful API
  • Write tests for the API


✔️     Chapter evaluation (max 19 points) You can get a maximum of 19 points after completing this section. More detailed evaluation is provided after each heading.

RESTful API implementation

List of implemented resources


📑  Content that must be included in the section A list of all implemented resources. Consider that not all resources that you have designed must be implemented.  The minimum requirements are summarized in the Minimum requirements section from the Project work assignment. You can use a table similar to the one you used to explain the uniform interface. Do not forget to include in the README.md file which is the path to access to your application remotely.


✔️     Evaluation criteria(max 0.5 points) In this section you can get a maximum of 0.5 points.
  • The table clearly shows which resources are implemented, and what requests they support: 1.0

✏️ Write here your text

GET PUT PATCH POST DELETE
event collection X
event item X X
events by user X
join event X X
user collection X X
user item X X X
user login X

Resources implementation

💻     TODO: SOFTWARE TO DELIVER IN THIS SECTION The code repository must contain:
  1. The source code for the RESTful API 
  2. The external libraries that you have used
  3. We recommend to include a set of scripts to setup and run your server
  4. A database file or the necessary files and scripts to automatically populate your database.
  5. A README.md file containing:
    • Dependencies (external libraries)
    • How to setup the framework.
    • How to populate and setup the database.
    • How to setup (e.g. modifying any configuration files) and run your RESTful API.
    • The URL to access your API (usually nameofapplication/api/version/)=> the path to your application.
NOTE: Your code MUST be clearly documented. For each public method/function you must provide: a short description of the method, input parameters, output parameters, exceptions (when the application can fail and how to handle such fail). Check Exercise 2 and 3 for examples on how to document the code.  In addition should be clear which is the code you have implemented yourself and which is the code that you have borrowed from other sources


✔️     Evaluation criteria(max 4.5 points) In this section you can get a maximum of 4.5 points:
  • Instructions to set up the API and run the tests are provided in the README.md file: 1.0
    • this means there should be no undocumented extra steps in running the code/tests!
  • The code has clear structure and naming for variables and methods: 1.0
  • You have clearly marked which parts of the code are your own work and which have been borrowed: 0.5
  • Each method's functionality is described in its documentation: 1.0
  • Parameters read from the request are described: 0.5
  • Responses are briefly described (refer to your API documentation): 0.5

✏️ You do not need to write anything in this section, just complete the implementation.

RESTful API testing

💻     TODO: SOFTWARE TO DELIVER IN THIS SECTION The code repository must contain:
  1. The code to test your RESTful API (Functional test)
    • The code of the test MUST be commented indicating what you are going to test in each test case.
    • The test must include values that force error messages
  2. The external libraries that you have used
  3. We recommend to include a set of scripts to execute your tests.
  4. A database file or the necessary files and scripts to automatically populate your database.
  5. A README.md file containing:
    • Dependencies (external libraries)
    • Instructions on how to run the different tests for your application.
Do not forget to include in the README.md the instructions on how to run your tests. Discuss briefly which were the main errors that you detected thanks to the functional testing.

Remember that you MUST implement a functional testing suite. A detailed description of the input / output in the a REST client plugin.

As with the database tests, in this section it is your responsibility that your API handles requests correctly. All of the example requests in your API documentation should work, and your API must give the responses from your documentation. You also need to show that invalid requests are properly handled, and that the responses match those in the documentation.



✔️     Evaluation criteria(max 14 points) In this section you can get a maximum of 14 points:
  • Test cases run correctly: 1.5
  • Each method is tested with correct requests: 2.0
  • Test cases cover all predictable error scenarios (various invalid requests) for all methods:4.0
  • Test output clearly describes the testing process for each case: 1.0
  • The interface works as intended (i.e. we don't find any errors. ) Errors will diminish this grade: 5.5
  • NOTE: In group with 4 people we will be more strict when assigning grades in this section.

✏️ You do not need to write anything in this section, just complete the implementation.

Resources allocation

Task Student Estimated time
RESTful API implementation Team work 25.5 hours
RESTful API testing Team work 34.5 hours
Documentation Team work 2 hours
⚠️ **GitHub.com Fallback** ⚠️