API Documentation
Document APIs people can use: contracts, examples, deprecation, and SDK ergonomics.
Learning path
Document APIs people can use: contracts, examples, deprecation, and SDK ergonomics.
Run "Deprecate an API endpoint without breaking clients that have not migrated yet." from "Add API Deprecation Headers" and confirm the documented result "Every legacy response carries the three headers.".
Next step: Add an OpenAPI Contract Test
⏱ 0.5h
Apply "Add an OpenAPI Contract Test" to a api documentation task, checking that "The document passes lint with no errors and a documented ruleset." appears after the "Detect breaking API changes and undocumented responses before a deploy, using the OpenAPI" step.
Prerequisites: Add API Deprecation Headers
Next step: Review API Contract Changes Before Merge
⏱ 0.5h
Use "Review API Contract Changes Before Merge" to decide "The diff is attached to the pull request and reviewed.", then prove the outcome with "Prevent an API change from breaking consumers silently, while allowing compatible evolution".
Prerequisites: Add an OpenAPI Contract Test
Next step: Zod
⏱ 0.5h
- 4
Zod
Wire "Zod" into a scratch api documentation project, following "z.object z.object(shape: ZodRawShape, params?: ZodObjectParams): ZodObject", and record one working request/response pair.
Prerequisites: Review API Contract Changes Before Merge
Next step: FastAPI
⏱ 1h
Read "FastAPI"'s documented surface around "Path Parameters @app.get('/items/{item_id}') def read_item(item_id: int): ...", then build a minimal endpoint and log the response.
Prerequisites: Zod
Next step: Express
⏱ 1h
Stand up "Express" for a api documentation task, confirm "Router express.Router(options?: RouterOptions): Router" holds, and document one failure you triggered.
Prerequisites: FastAPI
Next step: API Design Principles for Long-lived Systems
⏱ 1h
Compare "Pagination: One Consistent Way to Page" with "Idempotency: Retries Must Not Duplicate Work" in "API Design Principles for Long-lived Systems" and state which trade-off you would accept in api documentation code.
Next step: Lint Heading Structure in API Docs
⏱ 1h
In the "API Documentation" path, implement "Lint Heading Structure in API Docs" so JSON object: { markdown: string } yields [2:heading-jump:h1->h3,4:duplicate-heading:usage], including the second sample's edge case.
Next step: Capstone: API Documentation
⏱ 0.33h
Ship "Schema parser" from "Build a Schema Registry Service", then prove it with the project's test suite and an acceptance note.
Prerequisites: Lint Heading Structure in API Docs
Next step: Run the capstone's tests, publish the repository, and demo it to a reviewer.
⏱ 4h