Simple README Mock for the Bookstore API
*** REQUEST ***
GET /books
Accept: application/json
*** RESPONSE ***
200 OK
Content-Type: application/json
{ "books" : [
{"bookId":"123", isbn: "...". "title":"Nice Book", "authors": [ {"authorId":"abc", "fullName":"Sally Writer"} ] },
{"bookId":"456", isbn: "...". "title":"Good Book", "authors": [ {"authorId":"def", "fullName":"Susan Pen"} ] },
{"bookId":"789", isbn: "...". "title":"Great Book", "authors": [ {"authorId":"ghi", "fullName":"Sandra Reporter"} ] }
]
}
*** REQUEST ***
GET /books/search?searchQuery=Great
Accept: application/json
*** RESPONSE ***
200 OK
Content-Type: application/json
{ "books" : [
{"bookId":"789", isbn: "...". "title":"Great Book", "authors": [ {"authorId":"ghi", "fullName":"Sandra Reporter"}]}
]
}
*** REQUEST ***
POST /carts/q1w2e3/items
Content-Type: application/json
{"bookId":"789", "quantity":"1"}
*** RESPONSE ***
201 Create
Location: /carts/q1w2e3