Demo: designing the Shop API contract on a whiteboard
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
design products, categories, cart, and orders together. Prepares JNR-018-LAB1.
Draft outline details
Step by step
- List nouns from requirements: product, category, cart, cart item, order.
- Draw collections and sub-resources, then write one URL per use case.
- Fill a table: method, URL, success code, error codes.
- Planned mistake: add
POST /addToCartandPOST /placeOrder. Fix:POST /carts/{id}/itemsandPOST /carts/{id}/checkout(orPOST /orders). - Write one example request and response per endpoint.
- Peer-review with the checklist: nouns, plural, status codes, no leaked database structure.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.