Module 01 Activity
Scenario
Someone has proposed building an API. Establish whether it is the right shape and what it would promise.
What you build
A written contract for one endpoint, with the shape decision argued.
Steps
- Describe what needs to happen and say whether anything outside your process needs to call it. If not, say so plainly.
- Write the contract: request, response, every error status, and the guarantees you are prepared to keep.
- For each guarantee, name how you would test it.
- Decide which handlers wait on something external and which do CPU work, and choose
async defordeffor each with a reason. - Work down the six capability stages and mark where your requirement stops.
- Say what you are deliberately not building yet.
Evidence to hand in
- The shape decision with its reason.
- The contract with request, response, errors and guarantees.
- A test for each guarantee.
- The sync/async decision per handler.
- The capability stage you stopped at, and what you excluded.
Review checklist
- The decision cites something outside the process needing to call it.
- Every error status a caller must handle is listed.
- Each guarantee has a corresponding test.
- No handler is
async defwhile calling a synchronous library. - What you are not building is written down.
