To solve this, we turned our OpenAPI spec into highly modular docs:
- Every schema, endpoint, or parameter lives at a deterministic URL (/schemas/Product, /operations/CreateOrder, etc.)
- Each doc page has the TypeScript definition, relevant OpenAPI fragment, and links to related items
- LLMs (and human devs!) always get exactly the info they need—no more, no less.
- We automated the flow so docs auto update whenever OpenAPI changes
Result: much more accurate, reliable LLM-powered codegen and improved developer productivity.
Would love to know:
- Has anyone else hit this context overload problem?
- Are modular, LLM-optimized API docs for each API entity something others want/need?
Happy to share our approach or hear about others’ solutions!