Three Documentation Trends to Share with Your Team in 2022

Julia Seidman
by Julia Seidman on December 7, 2021 7 min read

Where APIs once served mostly text-based data, now they are the engines behind diverse SaaS products in virtually every industry and at almost every level of your technical stack. The way APIs are produced and consumed now is more sophisticated than it was even five years ago. But what about API documentation?

Providing a list of endpoints and some guidance on authorization tokens used to be enough to get developers started using an API. But as API offerings and use cases have gotten more complex, basic descriptive documentation isn’t enough. Updating your documentation might sound like a major project, but investing in a sustainable approach now can have big dividends in the time your team has to spend making manual changes and providing a great experience to your users.

Modernizing API documentation means incorporating three elements: Automation, Reusability, and Interactivity. Let’s dive into each of these below so that you can get your teams on-trend with API documentation.

Automate Docs to Keep Up with Dev Teams

A [design-first API approach](https://stoplight.io/api-design-guide/) is perfect for API teams who want to iterate frequently and efficiently. Shortening the release timetable for API updates creates value for your users and allows you to adapt rapidly to new demands. The downside of rapid iteration is that no one wants to slow down releases to document every change.

API maintainers need to always keep their users in mind, but rapid iteration is a bit of a double-edged sword. On the one hand, you want to free your development teams to do what they do best and not get bogged down in documentation procedures. At the same time, all that terrific innovation isn’t useful if API consumers don’t have an easy way to learn about it and try it out themselves

Automated docs are a good first-line solution for documenting references and functionality in a format that maps neatly to your API endpoints. At its most basic, automated documentation can be produced by open-source tools built around the OpenAPIspecification. These tools work by reading your OpenAPI specification file and feeding that data directly into an interactive web tool. They are quick to launch, and they update automatically whenever your OpenAPI specification file changes, but they come with limitations

Newer, more full-featured tools work in a similar way but offer greater adaptability for APIs that don’t precisely fit the OpenAPI standard, or which need greater customization and detail. Tools like Stoplight Elements offer greater support for Markdown, version control, and search functionality, among other improvements.

Create Reusable Modules for Consistent, Flexible Docs

The best documentation does more than just inform – it educates and inspires. Reference documents like we discussed above are necessary, but they are not likely to spark your API consumers’ creativity or encourage them to dig deeper.

For your documentation to achieve those lofty goals, it needs to be embedded throughout your developer experience. Developers using your product should be encountering examples, guides, and code samples frequently, not only when they seek them out. Seeing more documentation of your API in action helps developers envision new integrations and deepens their engagement with your product.

Once again, you may be thinking that this will mean a lot more work for your teams. Another key trait of excellent docs – consistency – provides some guardrails to help keep the work manageable. Developers use modular code to ensure that applications function as expected. Modular, reusable docs help deliver the same goal.

Stoplight supports modular documentation with a directory structure that lets you navigate and combine resources just as you would in a local filesystem. Images, code samples, and procedures that will show up in multiple locations in your docs can be saved inside the directory and linked directly in your Stoplight-flavored markdown files. Stripe is often cited for its excellent documentation. In their Online Payments section, they walk through many different payment scenarios. Each scenario includes code from the same `checkout.html` file, which contains a `script` link to a specific version of the Stripe script. When Stripe releases a new version of the script, they can update a single HTML file in their docs directory, and it will automatically update each payment scenario page. A single line in an HTML file is a very simple example, but it’s clear how this could scale for more significant changes in your procedures or product offerings.

stripe example

Another way to achieve the same goal is with content tagging and filtering. Duplicate docs are a headache for users and maintainers, but as the scope of your documentation grows, they can be challenging to avoid. Adding navigable tags to your docs makes it easier to direct users to relevant content, so you don’t have to worry about where resources are located and if users can find them. You can create a resource once, tag it, and be confident that it will be easily accessible from anywhere on your site. Tags help reduce the overhead of updating multiple docs on the same subject and eliminate the need to update and maintain specific links. The end goal is the same as with reusable modules- create high-quality docs once, and make them easy to find and reuse.

As you find places to integrate more practical, inspiring use cases and guides, using Stoplight Studio can help you organize your resources so they can be reused and shared. Again, it’s similar to best practices for developers- think of it as creating a ‘single source of truth’ for your docs. You’ll get greater consistency across your various guides and tutorials, and you’ll be able to quickly integrate your resources in places where they will be most visible and engaging.

Guide and Engage Your API Consumers with Interactive Docs

At some point, a developer who decides to start building with your API is going to need a place to test outcalls and explore results. Tools like Postman or Insomnia are popular, and providing collections for them is a great way to help developers play with your APIs, but it still requires them to go back and forth between your documentation and a third-party tool and doesn’t give you much insight into their initial developer experience.

Offering interactive features as part of your documentation is a way to meet developers’ needs and strengthen their connection with your product. If you can keep developers on your site and engaged with your docs, you can shape their experience by providing interactive experiences that are tailored to their needs and your offerings. Third-party tools require developers to do a lot of sifting results and combing through JSON. Features you build yourself can focus on what’s most relevant to the section of your docs users are in. You can also call attention to the kind of issues that trip users up, like providing a tool for exploring headers or highlighting best practices for tokens and secrets with an interactive demo.

Supply developers with options that let them short-cut around third-party tools and you can reduce the scope and focus users’ attention on the most important features and requirements of your API. When you let your users test requests and responses directly within your documentation, you gain their attention and shorten their ramp-up time.

The aim of documentation is to get people successfully using your API. It’s essential to provide a detailed factual record of your endpoints, but it’s not enough if your goal is to drive new integrations. Stay up-to-date with the latest advancements in API documentation. Create consistent, reusable, interactive documentation, and you will improve your developer experience — consider Stoplight Elements or Studio to get there faster. Educate and inspire your users, and they will start building sooner.

Share this post

Stoplight to Join SmartBear!

As a part of SmartBear, we are excited to offer a world-class API solution for all developers' needs.

Learn More
The blog CTA goes here! If you don't need a CTA, make sure you turn the "Show CTA Module" option off.

Take a listen to The API Intersection.

Hear from industry experts about how to use APIs and save time, save money, and grow your business.

Listen Now