Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.27 KB

File metadata and controls

31 lines (24 loc) · 1.27 KB

Enhancing the server with OpenAPI

Exercises

  1. Under server/api/controllers add a new insurances.js controller. You can simply copy hello_world.js as a template, if you like.
  2. Add a first endpoint to that controller: POST /insurances that receives an insurance request. Store the data you receive in-memory in a list. The data should be of the form (e.g.):
{
  "insuranceType": "property",
  "provider": "Capitol Versicherung AG"
}
  1. Add a second endpoint to that controller: GET /insurances that returns the insurances stored in-memory.

Help

Continue

Go to step 4