Consistency is a feature
On This Lesson 4 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
see why every endpoint should look and behave alike.
Planned topics
- A client developer learns one endpoint and expects the rest to work the same way.
- Decide once: field naming (
camelCaseorsnake_case), plural paths, error shape, page shape. - Write the decisions in a short style guide and check new endpoints against it.
- Inconsistency costs time in every client, forever.
- Consistency matters more than which choice you made.
Draft outline details
Demonstration
two endpoints side by side: one returns created_at, the other createdAt; one returns {"error":"x"}, the other a plain string. Mark each mismatch.
Check your understanding
What is the style guide for?
Show answer
One set of decisions applied to every endpoint.
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.