Glengall Handbook
Documentation

Give examples an ordinary bad day

The happy path is only the beginning.

Show a small successful response

Start with the smallest useful example. Choose concrete values whose meaning is obvious and explain any optional fields nearby. An example is easier to follow when it does not introduce ten unrelated concepts at the same time.

Include an expected failure

Show what a missing field, unavailable resource or invalid value looks like. Describe the status and the response body together. A reader should be able to recognise the difference between a request they can correct and a failure that requires a later attempt.

Keep examples reproducible

Use fictional example data consistently and avoid real personal records. When a field changes, update all examples that contain it. A valid JSON document can still be misleading if its values contradict the surrounding explanation.

Open the workbench → · Back to the notes

Keep reading