When you treat docs like code, you multiply everyone’s efforts and streamline processes through collaboration, automation, and plain old hard work. To create a cohesive API experience, developers, technical marketing engineers, technical writers, and product managers can work together on GitHub to produce web pages and API documentation, including interactive API docs and tutorials. The ways you can leverage developer processes and tools in a docs-as-code system vary widely. Let's walk through some examples including tools, version control, publishing workflows, approvals, source formats, checklists, automated testing, and final approval. Also, let's take some time to share some of the pitfalls and difficulties possible when you work on API and tools documentation for a large and varied product catalog with more than a thousand contributors.
3. Define docs as code
GitHub or GitLab as a CMS
(Content Management System)
Version control for documentation source files (close to code)
Automatic builds for docs
Test the docs (close to code)
Review with technical collaborators
Merge the docs
Continuous integration, continuous deployment
Publish (possibly automatically after requirements are met)
Repeat
11. Landing pages and dev centers:
XML, HTML
Technical documentation:
Markdown, JSON, HTML
Interactive API documentation:
OpenAPI specification
(YAML or JSON)
Interactive tutorials: Dockerfile, code
Pages on developer.cisco.com
Developer content
Collaborators on the book, Diane Skwish and Kelly Holcomb, had been on a couple of teams making this shift. Eric Holscher was a co-founder of the Write the Docs community. We had a lot of observations and wanted to share.
Store the doc source files in a version control system. Keep them as close to the code as possible.
Consider files as truly source, not output, for simplicity in authoring and reviewing.
Build the doc artifacts automatically.
Make builds so low-cost that you can repeatedly and reliably build every time you make a change. Continuous integration.
Ensure that a trusted set of reviewers meticulously reviews the docs – source and output.
Publish the artifacts without much human intervention.
How do teams publish their documentation on developer.cisco.com?
How many pages get updated a week on DevNet? Who are the authors and what tools do they use? Learn all this and get any other questions answered in this technical session about how DevNet treats docs like code. When you treat docs like code, you multiply everyone’s efforts and streamline processes through coordination, automation, and production using developer tools. The benefits are real, and these efforts may seem complex, so let's unpack version control, publishing, REST API documentation, source formats, automation, quality controls and testing, and lessons learned.
Cisco Business Unit representative fills out onboarding form
Adrienne Moherek from my team meets with the product team, tech writers, others to learn more
Team may need infrastructure like a Sandbox for hands-on environments
Team gets trained on PubHub
Wide Range of Content Contributors
Developers, SME, Web Designers, Professional Tech writers etc.
Self-Service to scale (low touch)
Good review/approval flow for maintain content quality.
Low barrier to authoring
Continuous update and publishing flow
Wide Range of Content Contributors
Developers, SME, Web Designers, Professional Tech writers etc.
Self-Service to scale (low touch)
Good review/approval flow for maintain content quality.
Low barrier to authoring
Continuous update and publishing flow
Demo
Demo at https://developer.cisco.com/meraki/api-v1/#!get-organizations
Demo at https://developer.cisco.com/learning/
Lead engineer: Neelesh Pateriya
517: Published sites & doc sets
1491: Content Contributors
2175 Projects
≈92k Updates
Using Postman, let’s map the OAS elements into an HTTP request and response. Notice that the ‘paths’ element acts as a bridge for most details about a request and the possible responses that may be returned
Notice the versions at the top and bottom.
Version at the top is the version of the specification
Version in the info section is the version of the API
Pop quiz about versions?
If you have the API service is in the cloud, then use the cloud URL. For example meraki uses https://api.meraki.com/
If the API service is on-premise, than this is where you would include the URL to a DevNet Always-on Sandbox so that developers can make requests to a server.
Operations are defined by a path + HTTP method (aka verb) + input parameters + one or more response details. Operations may also have examples that can assist developers in better understanding how to use the operation effectively
Components help to capture reusable elements that may be referenced within and across OAS files.
Source: https://swagger.io/docs/specification/components/
Schema components define reusable structures for request inputs and response outputs. They are often referenced from operations or from one schema to another. This increases reuse across an API. Likewise, HTTP request and response headers can be reused for things such as conveying rate limits to an API client, authorization token headers, and other important elements
Components help to capture reusable elements that may be referenced within and across OAS files.
Source: https://swagger.io/docs/specification/components/
Schema components define reusable structures for request inputs and response outputs. They are often referenced from operations or from one schema to another. This increases reuse across an API. Likewise, HTTP request and response headers can be reused for things such as conveying rate limits to an API client, authorization token headers, and other important elements
Show best examples and connect the teams to each other. Other ideas?
Four-day training course available for tech writers, product managers, and engineers who RAVE about OAS.
We should probably tackle content testing with a Python tool meant to run the content end-to-end. Other ideas?
Also https://idratherbewriting.com/learnapidoc/docapis_measuring_impact.html
Content input parsing & output publishing is pluggable architecture in pubhub.
Input plugins MD to html, swagger to html, epub html to generic html (recently added) .. other can be added easily.
Output publishing is also plugin based. Added Course output, Learning Lab output plugin in addition to site, doc publishing plugin.
Supported by pubhub-support mailing list – Anne’s team and engineering team.