Prompt
Do I need to maintain docs separately from the API definition?
Latest observation
Oct 4, 2026
OpenAI APIWeb search: off
Usually, no—you should try to keep docs derived from the API definition, not maintained as a separate source of truth.
Best practice
- API definition as source of truth
Use OpenAPI, GraphQL schema, protobuf, etc. to define the contract. - Docs generated from it
Generate reference docs, examples, and client/server stubs where possible.
Why this is better
- Avoids drift between docs and implementation
- Makes versioning easier
- Reduces duplicated effort
- Keeps changes consistent across teams
When separate docs still help
You may still want human-written docs for:
- Concepts and architecture
- Auth flows, workflows, and edge cases
- Tutorials / onboarding
- Business rules not expressible in the schema
Practical rule
- Reference docs → generated from the API spec
- Guides and explanations → maintained separately
If you want, I can suggest a good docs structure for an OpenAPI-based API.