How would you structure API docs and tools for reference and narrative?

Tests if you separate auto-generated reference from narrative guides. Strong answers pair OpenAPI/Swagger endpoints with hand-written getting-started tutorials and conceptual overviews in a docs-as-code static site.
What's really being asked
Whether you understand that API documentation is not monolithic. Interviewers want to see that you recognize the split between structured, machine-generated reference documentation and human-authored narrative content, and that you know how to integrate both into a cohesive developer experience. They are looking for familiarity with the OpenAPI ecosystem, docs-as-code workflows, and information architecture that serves developers at different skill levels.
The full answer
First, a two-pillar content model. On one side, reference documentation generated from an OpenAPI specification using tools like Swagger UI, Redocly, or Stoplight. This covers endpoints, methods, parameters, request and response schemas, and authentication details. On the other side, narrative and conceptual docs written by hand: a product overview, a getting-started tutorial, authentication and authorization guides, status and error code explanations, rate limiting details, quick references, and a glossary. Second, a unified delivery strategy. Use a docs-as-code approach where narrative content lives in Markdown under version control, and a static site generator pulls in both the hand-written guides and the auto-generated OpenAPI reference to publish a single hybrid site. Third, audience-aware sequencing. Beginners need a curated path, starting with a product overview and a step-by-step tutorial that makes a real API call, before they ever see a raw endpoint reference. Experienced developers want to jump straight to the OpenAPI-generated specs or a quick reference. Fourth, tooling specifics. Mention authoring the OpenAPI spec in YAML or JSON, possibly using Stoplight for visual design, then publishing with Swagger UI for interactive exploration or Redocly for polished rendering, while the narrative layer might be built with a static site generator that supports custom pages.
The mistakes people make
Suggesting that Swagger or OpenAPI alone solves the documentation problem. Auto-generated reference docs list endpoints but do not explain why a developer should care, how to get an API key, or how to handle pagination. Another red flag is proposing a fully manual documentation process with no OpenAPI spec, which signals unfamiliarity with modern API doc standards. Proposing PDF or Word-based publishing instead of web-based, version-controlled docs is also a negative signal for technical audiences.
What usually comes next
How do you keep the OpenAPI spec in sync with the implementation? How do you handle versioning when the API changes? What is your strategy for testing code samples and ensuring they still work? How do you measure whether developers are successfully onboarding versus getting stuck?
A concrete example
For a weather API, you would maintain an openapi.yaml file describing the current conditions endpoint, its parameters like latitude and longitude, and its JSON response schema. Swagger UI renders this into an interactive reference page where developers can execute requests. Alongside that, you write a getting-started tutorial that walks a beginner through signing up for a key, making their first curl call, and parsing the JSON response. Both the tutorial and the Swagger UI output are published through the same static site generator under a single domain, with cross-links between the tutorial and the reference so a beginner can move from narrative to spec seamlessly.
Interview question
When designing a developer portal that serves both new and experienced API consumers, which structure best follows industry best practices?
- a.Pair auto-generated OpenAPI reference with curated narrative content in a single docs-as-code static siteCorrect
- b.Maintain hand-written narrative guides in a wiki and link out to a standalone Swagger UI reference
- c.Publish a comprehensive PDF developer manual and update the OpenAPI schema only for internal testing
- d.Generate all documentation from the OpenAPI specification and embed getting-started notes inside endpoint descriptions
Why? this is the answer
A unified docs-as-code site that combines machine-generated endpoint reference with human-authored tutorials and overviews gives beginners a curated onboarding path while letting experienced developers jump straight to specs. Relying solely on OpenAPI descriptions cannot replace structured narrative guides, and splitting content across separate platforms fragments the developer experience.
Just read this? Test yourself on what you have been reading.
Read the original → idratherbewriting.com
- #api documentation
- #openapi
- #docs-as-code
- #developer experience
- #technical writing
You just looked this up. Could you explain it out loud?
That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles