Skip to content
Ameen Abozaid
Planned lessonJNR-020-L06

Demo: enforcing the Shop API style guide

  • Lesson 6 of 6
  • Junior
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

write the guide and bring the API into line. Prepares JNR-020-LAB1.

Draft outline details

Step by step

  1. Write a one-page style guide: naming, money, dates, enums, errors, paging, filtering, versioning.
  2. Audit all endpoints in a table: rule, endpoint, pass or fail.
  3. Fix the failures: rename fields, switch prices to cents, use ISO dates.
  4. Planned mistake: a price returned as 19.99 (double). Fix: priceCents: 1999, then update tests.
  5. Add category, minPrice, and maxPrice filters to GET /products and test them.

Practice

Apply this lesson with the module's lab, exercises and quiz.

Lab and exercises Quiz

Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.

Type to search levels, phases, modules and lessons.