In this chapter, we will focus on writing our first API resource: /books. We will take this in small chunks and test it as we go. At the end of the next few chapters we will have a fully-tested /books resource doing basic CRUD operations. The /books resource will look like this:
Basic REST /books Resource
GET /books Get all the books
POST /books Create a new book
GET /books/{id} Get a book
PUT /books/{id} Update a book
DELETE /books/{id} Delete a book
Creating the First Endpoint
The first order of business to create a BooksControllerTest class and write your first failing test. You will then write the minimum ...