SlideShare une entreprise Scribd logo
1  sur  45
Anne Gentle
Developer Experience Manager
September 8, 2022
Publishing Processes
for API Experiences
Docs as Code
© 2022 Cisco and/or its affiliates. All rights reserved. 2
Hi!
• I’m a Developer Experience Manager for
Cisco DevNet.
• We treat docs like code for over 1000
code repositories for multiple developer
products and platforms at Cisco.
• There’s a book and site, Docs Like Code,
to provide better onboarding for these
techniques.
• Find the story about Cisco DevNet on
docslikecode.com.
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
© 2022 Cisco and/or its affiliates. All rights reserved. 4
© 2022 Cisco and/or its affiliates. All rights reserved.
DevNet Program
Questions in Webex
• Question comes in on
12/02/2020 at 1:30 pm Central
• Team size, you ask?
• Two central dev doc coordinators
• Three contract technical writers
(one intern at that time)
• Many tools and platforms engineers
• 1,700+ PubHub contributors
© 2022 Cisco and/or its affiliates. All rights reserved. 5
What is the process and who are the
authors?
What API documentation and
developer tutorials do you create?
What are the tools?
What parts are difficult?
Agenda
1
2
3
4
© 2022 Cisco and/or its affiliates. All rights reserved. 6
What is the process
and who are the authors?
© 2022 Cisco and/or its affiliates. All rights reserved. 7
Typical questions:
• Who are your targeted developers and
top use cases?
• How can DevNet help meet your goals?
• Tell us about your content, is it currently
published anywhere, do you have login or
access requirements, what is created
already, what needs to be created?
• Is there any important messaging or an
event for DevNet to know about?
Onboarding form – filled out by Cisco Business Unit
representative
© 2022 Cisco and/or its affiliates. All rights reserved. 8
• Developers
• Engineers
• Technical Marketing Engineers
• Technical Writers
• Product Managers
Technical staff at Cisco
© 2022 Cisco and/or its affiliates. All rights reserved. 9
• Activity represents internal drafts and
preview on staging.
• For example, 13 changes on a
Tuesday last week.
• 70 changes in 2 weeks included a
US holiday week.
• Nothing gets published without a
person reviewing.
• With enough trusted tests, you can
have true CICD for documentation.
Repository = PubHub project
Activity = green graph lines
© 2022 Cisco and/or its affiliates. All rights reserved. 10
What API documentation and
developer tutorials do you
create?
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
© 2022 Cisco and/or its affiliates. All rights reserved. 12
© 2022 Cisco and/or its affiliates. All rights reserved.
Technical
documentation
• Sidebar table of contents.
• Markdown source files for text.
• JSON source for organization.
• Multiple configuration options
for Next/Prev buttons, TOC
expansion, code examples.
• pubhub.cisco.com/docs
© 2022 Cisco and/or its affiliates. All rights reserved. 13
© 2022 Cisco and/or its affiliates. All rights reserved.
Interactive
REST API docs
• Industry-standard OpenAPI
source files
• Meraki source:
https://raw.githubusercontent.c
om/meraki/openapi/master/op
enapi/spec2.json
© 2022 Cisco and/or its affiliates. All rights reserved. 14
© 2022 Cisco and/or its affiliates. All rights reserved.
Try out the Meraki
REST API
• Created API Key and Organization
data for everyone to use: read-
only access.
• User can enter their own
credentials and make real calls.
• Python SDK examples for every
endpoint.
• Postman Collection provided
separately.
© 2022 Cisco and/or its affiliates. All rights reserved. 15
© 2022 Cisco and/or its affiliates. All rights reserved.
Interactive
Learning Center
• Student reads or does hands-on activities
• System tracks progress
• For interactive Labs, system launches
interactive terminal and file system in-
browser using containers on Kubernetes
cluster
• Labs that require Cisco gear use
Sandboxes or other infrastructure
© 2022 Cisco and/or its affiliates. All rights reserved. 16
© 2022 Cisco and/or its affiliates. All rights reserved.
Interactive tutorials
• Author starts with a Docker
container, installs what they
want to teach.
• Author writes Markdown with
Python or Bash commands
that the student runs in the
browser.
© 2022 Cisco and/or its affiliates. All rights reserved. 17
What are the tools?
© 2022 Cisco and/or its affiliates. All rights reserved. 18
Author
• Visual Studio Code
(Acrolinx plugin)
• editor.swagger.io
(OpenAPI)
• Vim or Emacs
Tools
Source Control
• Git
• Git Bash
• GitHub
• GitHub Desktop
Develop
• OpenAPI
• Docker
• Python
• JavaScript
© 2022 Cisco and/or its affiliates. All rights reserved. 19
Author and Source Control –
making changes
Create a
branch
Get ready to make your
changes
Commit the
changes
Save your work
Clone the repo
Make a local copy of the
code repository
Make your
changes
Create, edit, add, delete
Push your
branch
Preview the changes
PR
© 2022 Cisco and/or its affiliates. All rights reserved. 20
Reviewer and Source Control –
approving changes
Write
comments
Write inline comments to
the author
Approve the
changes
Save your work
Review the pull
request
Visual diff in GitHub UI
Author makes
your changes
Create, edit, add, delete,
and push back to GitHub
Preview and/or
publish
Use PubHub UI to approve
and push to
developer.cisco.com
© 2022 Cisco and/or its affiliates. All rights reserved. 21
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Authoring tool
Any text-based editor or IDE
(Integrated Developer
Environment).
© 2022 Cisco and/or its affiliates. All rights reserved. 22
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Visual Diff
Red is removed, green is
added.
Comments can be inline or
overall.
© 2022 Cisco and/or its affiliates. All rights reserved. 23
© 2022 Cisco and/or its affiliates. All rights reserved.
PubHub preview
• Published project has current
production state.
• List of collaborators all have
access to work on this project.
• Change detected shows the
preview, organization and layout
only.
• To preview on staging you
”Request to publish” – and repeat.
© 2022 Cisco and/or its affiliates. All rights reserved. 24
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
editor.swagger.io
• Online editor that validates.
• Files can be YAML or JSON.
• OAS training available for
technical writers, engineers,
product managers, and
developers to learn the
OpenAPI specification.
JSON vs. YAML: Side-by-side
YAML
JSON
© 2022 Cisco and/or its affiliates. All rights reserved. 26
© 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Training:
OAS v3 Elements
OpenAPI 3.x
info
servers security
paths
tags externalDocs
components
27
info
© 2022 Cisco and/or its affiliates. All rights reserved. 28
OAS Elements: Info Example info
© 2022 Cisco and/or its affiliates. All rights reserved. 29
Describes one or
more API endpoints
for cloud and on-
premises APIs
They may be a
complete URL or use
variable substitution
OAS Elements: Servers (aka Hosts) servers
© 2022 Cisco and/or its affiliates. All rights reserved. 30
Operation = Path + HTTP
Method
Query parameter
• GET /alarms?active=true
200: Response with payload
OAS Elements: Paths
paths
Learn more about status codes
https://developer.cisco.com/apistyleguide/#rest-style/returning-
http-status-codes
© 2022 Cisco and/or its affiliates. All rights reserved. 32
Define reusable structures for
request inputs and response
outputs.
Often referenced from
operations or from one schema
to another.
Helpful for keeping “Don’t
Repeat Yourself” DRY
principles.
OAS Elements: Schema Components
components
© 2022 Cisco and/or its affiliates. All rights reserved. 33
Four-day training is a deep
dive
Still need to version-control
improvements if the spec is
generated
Reuse is possible with OAS
OpenAPI
Docs improvements
OpenAPI 3.x
info
servers security
paths
tags externalDocs
components
© 2022 Cisco and/or its affiliates. All rights reserved. 34
What parts are difficult?
© 2022 Cisco and/or its affiliates. All rights reserved. 35
• Teams compare one product API
metrics to another, but they’re not
similar. At all.
• Engineers learn ”just enough”
OpenAPI Specification to generate it
automatically. Try to set it and forget
it.
• Automated testing is difficult! So far,
we have only figured out half of the
equation, the container half.
API Docs are Hard
Anyone who says otherwise, well…
© 2022 Cisco and/or its affiliates. All rights reserved. 36
Getting Actionable Feedback
• Was the information in the document accurate?
• Was the information in the document relevant?
• Was the information in the document easy to understand?
• Could you find the information you needed in the document?
Beyond Accuracy: What Documentation Quality Means to Readers
February 2019
Technical Communication (Washington) 66(1):7-29
Accurate, Relevant, Easy to Understand, Accessible
© 2022 Cisco and/or its affiliates. All rights reserved. 37
PowerBI Dashboard
Metrics
NPS = Net Promotor Score
Promoter = 9 or 10
Passive = 8, 7, 6, 5, 4
Detractor = 3, 2, 1
Star Rating = 1-5 stars
© 2022 Cisco and/or its affiliates. All rights reserved. 39
© 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Summary
Process: Docs as Code,
onboarding for documentation,
infrastructure, developer
experience needs.
Authors: technical contributors on
Enterprise GitHub.
Output: developer.cisco.com
landing pages, technical
documentation, interactive API
docs and interactive learning.
Tools: Editors, IDEs, OpenAPI,
Docker, PubHub, PowerBI, Git, and
GitHub.
© 2022 Cisco and/or its affiliates. All rights reserved. 40
Links
• Documenting APIs: A guide for technical writers and engineers
• Docs Like Code: https://docslikecode.com
• GitHub Pages: https://pages.github.com
• Meraki API Docs: https://developer.cisco.com/meraki/api-v1/
• Meraki OpenAPI Spec: https://github.com/meraki/openapi
• Measuring documentation quality through user feedback:
https://idratherbewriting.com/learnapidoc/docapis_measuring_impact.html
Where to find out more
We are hiring!
https://cs.co/api-quality-job
Scan for job link!
© 2022 Cisco and/or its affiliates. All rights reserved. 41
Q&A
© 2022 Cisco and/or its affiliates. All rights reserved. 43
Reference information
© 2022 Cisco and/or its affiliates. All rights reserved. 44
Source
• GitHub can do version control, but
isn’t used on source files currently in
the “GitHub tagged release” way.
• Branches do let us have fine control
of each change but that is not the
same as version control.
• We could automate source release
production using the GitHub API.
Output
• PubHub has a way to indicate the
version group for a PubHub project
so that the output has a drop-down
version menu.
Version control
© 2022 Cisco and/or its affiliates. All rights reserved. 45
Git
• Version control technology
• Widely used across the industry
• Interaction with command line
interface (CLI) or graphical user
interface (GUI)
• Services include: GitLab, BitBucket,
and GitHub
GitHub
• Cloud-based git host
• Public: github.com
• Cisco enterprise: wwwin-
github.cisco.com
Git and GitHub as a CMS
© 2022 Cisco and/or its affiliates. All rights reserved. 46
GitHub terms
• Repository: A collection of content or code
• Branch: A set of changes within a repository
• Each branch has a unique name
• Branch can exist locally and on GitHub
• Commit: Saving changes at a point-in-time or a selected point of completion
• Push: Sending a Commit to the collaborative GitHub UI for review
• Merge: Adding the code from one branch to another
• Pull Request: A collection of changes from a commit ready for review
Useful vocabulary to have; quite specific to Git
© 2022 Cisco and/or its affiliates. All rights reserved. 47
Content Authors
Enterprise GitHub /
github.com
Content
Source
DevNet
DevNet Site
App
Course App
(Custom Render)
Publish
S3
(Public & Protected)
CloudFront Metadata
Service
HTML/Web, Markdown, Swagger..
Preview +
Publish Stage
Editor/Approver
Pubhub
Authoring Editing Review Approve Render
Versioning Search
PubHub
Architecture

Contenu connexe

Similaire à Docs as Code: Publishing Processes for API Experiences

Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and ConfigurationsInclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Pronovix
 

Similaire à Docs as Code: Publishing Processes for API Experiences (20)

Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWERContinuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
Continuous Integration with Cloud Foundry Concourse and Docker on OpenPOWER
 
Why Automate the Network?
Why Automate the Network?Why Automate the Network?
Why Automate the Network?
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptxDeploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
Deploy and Update Jakarta EE & MicroProfile applications with Paketo.pptx
 
DEVASC_Module_1.pdf
DEVASC_Module_1.pdfDEVASC_Module_1.pdf
DEVASC_Module_1.pdf
 
Apidays Paris 2023 - Managing OpenAPI Documents at Scale, Stéve Sfartz, Cisco
Apidays Paris 2023 - Managing OpenAPI Documents at Scale, Stéve Sfartz, CiscoApidays Paris 2023 - Managing OpenAPI Documents at Scale, Stéve Sfartz, Cisco
Apidays Paris 2023 - Managing OpenAPI Documents at Scale, Stéve Sfartz, Cisco
 
Dev ops in the cloud use case and best practices meetup
Dev ops in the cloud use case and best practices   meetupDev ops in the cloud use case and best practices   meetup
Dev ops in the cloud use case and best practices meetup
 
Continuous Integration & Continuous Delivery
Continuous Integration & Continuous DeliveryContinuous Integration & Continuous Delivery
Continuous Integration & Continuous Delivery
 
Road to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache HopRoad to NODES - Handling Neo4j Data with Apache Hop
Road to NODES - Handling Neo4j Data with Apache Hop
 
Cisco Connect Toronto 2018 DevNet Overview
Cisco Connect Toronto 2018  DevNet OverviewCisco Connect Toronto 2018  DevNet Overview
Cisco Connect Toronto 2018 DevNet Overview
 
Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life Achieving Full Stack DevOps at Colonial Life
Achieving Full Stack DevOps at Colonial Life
 
DevNetCreate Workshop - build a react app - React crash course
DevNetCreate Workshop - build a react app - React crash courseDevNetCreate Workshop - build a react app - React crash course
DevNetCreate Workshop - build a react app - React crash course
 
Industrializing Machine Learning on an Enterprise Azure Platform with Databri...
Industrializing Machine Learning on an Enterprise Azure Platform with Databri...Industrializing Machine Learning on an Enterprise Azure Platform with Databri...
Industrializing Machine Learning on an Enterprise Azure Platform with Databri...
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and ConfigurationsInclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
 
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earthPittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
PittsburgJUG_Cloud-Native Dev Tools: Bringing the cloud back to earth
 
Guidelines for Working with Contract Developers in Evergreen
Guidelines for Working with Contract Developers in EvergreenGuidelines for Working with Contract Developers in Evergreen
Guidelines for Working with Contract Developers in Evergreen
 
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
Webex Teams Widgets Technical Drill down - Cisco Live Orlando 2018 - DEVNET-3891
 
CDK - The next big thing - Quang Phuong
CDK - The next big thing - Quang PhuongCDK - The next big thing - Quang Phuong
CDK - The next big thing - Quang Phuong
 
DevOps intro
DevOps introDevOps intro
DevOps intro
 
Enterprise-Grade DevOps Solutions for a Start Up Budget
Enterprise-Grade DevOps Solutions for a Start Up BudgetEnterprise-Grade DevOps Solutions for a Start Up Budget
Enterprise-Grade DevOps Solutions for a Start Up Budget
 

Plus de Anne Gentle

Plus de Anne Gentle (20)

Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and ConfigurationsInclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
 
Make an Instant Website with Webhooks
Make an Instant Website with WebhooksMake an Instant Website with Webhooks
Make an Instant Website with Webhooks
 
Docs Like Code
Docs Like CodeDocs Like Code
Docs Like Code
 
Docs Like Code: Strategies and Stories
Docs Like Code: Strategies and StoriesDocs Like Code: Strategies and Stories
Docs Like Code: Strategies and Stories
 
Deploying Apps on OpenStack
Deploying Apps on OpenStackDeploying Apps on OpenStack
Deploying Apps on OpenStack
 
Collaborating on GitHub for Open Source Documentation
Collaborating on GitHub for Open Source DocumentationCollaborating on GitHub for Open Source Documentation
Collaborating on GitHub for Open Source Documentation
 
Journey into Continuous Glucose Monitoring Technology as a Parent
Journey into Continuous Glucose Monitoring Technology as a ParentJourney into Continuous Glucose Monitoring Technology as a Parent
Journey into Continuous Glucose Monitoring Technology as a Parent
 
Collaborating on GitHub for Open Source Documentation
Collaborating on GitHub for Open Source DocumentationCollaborating on GitHub for Open Source Documentation
Collaborating on GitHub for Open Source Documentation
 
Git and GitHub for Documentation
Git and GitHub for DocumentationGit and GitHub for Documentation
Git and GitHub for Documentation
 
Writing a Technical Talk Proposal
Writing a Technical Talk ProposalWriting a Technical Talk Proposal
Writing a Technical Talk Proposal
 
Women in tech: Be that light
Women in tech: Be that lightWomen in tech: Be that light
Women in tech: Be that light
 
You'll Never Look at Developer Support the Same Way Again
You'll Never Look at Developer Support the Same Way AgainYou'll Never Look at Developer Support the Same Way Again
You'll Never Look at Developer Support the Same Way Again
 
So You Want to be an OpenStack Contributor
So You Want to be an OpenStack ContributorSo You Want to be an OpenStack Contributor
So You Want to be an OpenStack Contributor
 
OpenStack Doc Overview for Boot Camp
OpenStack Doc Overview for Boot CampOpenStack Doc Overview for Boot Camp
OpenStack Doc Overview for Boot Camp
 
Social Media, Social Networking, and Social Relevance in Tech Comm
Social Media, Social Networking, and Social Relevance in Tech CommSocial Media, Social Networking, and Social Relevance in Tech Comm
Social Media, Social Networking, and Social Relevance in Tech Comm
 
OpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATXOpenStack How To - PyLadies ATX
OpenStack How To - PyLadies ATX
 
Women of OpenStack breakfast welcome
Women of OpenStack breakfast welcomeWomen of OpenStack breakfast welcome
Women of OpenStack breakfast welcome
 
Social web for Tech Comm, STC March 2013
Social web for Tech Comm, STC March 2013Social web for Tech Comm, STC March 2013
Social web for Tech Comm, STC March 2013
 
OpenStack documentation & translation management 2012_summit
OpenStack documentation & translation management 2012_summitOpenStack documentation & translation management 2012_summit
OpenStack documentation & translation management 2012_summit
 
OpenStack Documentation in the Open
OpenStack Documentation in the OpenOpenStack Documentation in the Open
OpenStack Documentation in the Open
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Docs as Code: Publishing Processes for API Experiences

  • 1. Anne Gentle Developer Experience Manager September 8, 2022 Publishing Processes for API Experiences Docs as Code
  • 2. © 2022 Cisco and/or its affiliates. All rights reserved. 2 Hi! • I’m a Developer Experience Manager for Cisco DevNet. • We treat docs like code for over 1000 code repositories for multiple developer products and platforms at Cisco. • There’s a book and site, Docs Like Code, to provide better onboarding for these techniques. • Find the story about Cisco DevNet on docslikecode.com.
  • 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
  • 4. © 2022 Cisco and/or its affiliates. All rights reserved. 4 © 2022 Cisco and/or its affiliates. All rights reserved. DevNet Program Questions in Webex • Question comes in on 12/02/2020 at 1:30 pm Central • Team size, you ask? • Two central dev doc coordinators • Three contract technical writers (one intern at that time) • Many tools and platforms engineers • 1,700+ PubHub contributors
  • 5. © 2022 Cisco and/or its affiliates. All rights reserved. 5 What is the process and who are the authors? What API documentation and developer tutorials do you create? What are the tools? What parts are difficult? Agenda 1 2 3 4
  • 6. © 2022 Cisco and/or its affiliates. All rights reserved. 6 What is the process and who are the authors?
  • 7. © 2022 Cisco and/or its affiliates. All rights reserved. 7 Typical questions: • Who are your targeted developers and top use cases? • How can DevNet help meet your goals? • Tell us about your content, is it currently published anywhere, do you have login or access requirements, what is created already, what needs to be created? • Is there any important messaging or an event for DevNet to know about? Onboarding form – filled out by Cisco Business Unit representative
  • 8. © 2022 Cisco and/or its affiliates. All rights reserved. 8 • Developers • Engineers • Technical Marketing Engineers • Technical Writers • Product Managers Technical staff at Cisco
  • 9. © 2022 Cisco and/or its affiliates. All rights reserved. 9 • Activity represents internal drafts and preview on staging. • For example, 13 changes on a Tuesday last week. • 70 changes in 2 weeks included a US holiday week. • Nothing gets published without a person reviewing. • With enough trusted tests, you can have true CICD for documentation. Repository = PubHub project Activity = green graph lines
  • 10. © 2022 Cisco and/or its affiliates. All rights reserved. 10 What API documentation and developer tutorials do you create?
  • 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
  • 12. © 2022 Cisco and/or its affiliates. All rights reserved. 12 © 2022 Cisco and/or its affiliates. All rights reserved. Technical documentation • Sidebar table of contents. • Markdown source files for text. • JSON source for organization. • Multiple configuration options for Next/Prev buttons, TOC expansion, code examples. • pubhub.cisco.com/docs
  • 13. © 2022 Cisco and/or its affiliates. All rights reserved. 13 © 2022 Cisco and/or its affiliates. All rights reserved. Interactive REST API docs • Industry-standard OpenAPI source files • Meraki source: https://raw.githubusercontent.c om/meraki/openapi/master/op enapi/spec2.json
  • 14. © 2022 Cisco and/or its affiliates. All rights reserved. 14 © 2022 Cisco and/or its affiliates. All rights reserved. Try out the Meraki REST API • Created API Key and Organization data for everyone to use: read- only access. • User can enter their own credentials and make real calls. • Python SDK examples for every endpoint. • Postman Collection provided separately.
  • 15. © 2022 Cisco and/or its affiliates. All rights reserved. 15 © 2022 Cisco and/or its affiliates. All rights reserved. Interactive Learning Center • Student reads or does hands-on activities • System tracks progress • For interactive Labs, system launches interactive terminal and file system in- browser using containers on Kubernetes cluster • Labs that require Cisco gear use Sandboxes or other infrastructure
  • 16. © 2022 Cisco and/or its affiliates. All rights reserved. 16 © 2022 Cisco and/or its affiliates. All rights reserved. Interactive tutorials • Author starts with a Docker container, installs what they want to teach. • Author writes Markdown with Python or Bash commands that the student runs in the browser.
  • 17. © 2022 Cisco and/or its affiliates. All rights reserved. 17 What are the tools?
  • 18. © 2022 Cisco and/or its affiliates. All rights reserved. 18 Author • Visual Studio Code (Acrolinx plugin) • editor.swagger.io (OpenAPI) • Vim or Emacs Tools Source Control • Git • Git Bash • GitHub • GitHub Desktop Develop • OpenAPI • Docker • Python • JavaScript
  • 19. © 2022 Cisco and/or its affiliates. All rights reserved. 19 Author and Source Control – making changes Create a branch Get ready to make your changes Commit the changes Save your work Clone the repo Make a local copy of the code repository Make your changes Create, edit, add, delete Push your branch Preview the changes PR
  • 20. © 2022 Cisco and/or its affiliates. All rights reserved. 20 Reviewer and Source Control – approving changes Write comments Write inline comments to the author Approve the changes Save your work Review the pull request Visual diff in GitHub UI Author makes your changes Create, edit, add, delete, and push back to GitHub Preview and/or publish Use PubHub UI to approve and push to developer.cisco.com
  • 21. © 2022 Cisco and/or its affiliates. All rights reserved. 21 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Authoring tool Any text-based editor or IDE (Integrated Developer Environment).
  • 22. © 2022 Cisco and/or its affiliates. All rights reserved. 22 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Visual Diff Red is removed, green is added. Comments can be inline or overall.
  • 23. © 2022 Cisco and/or its affiliates. All rights reserved. 23 © 2022 Cisco and/or its affiliates. All rights reserved. PubHub preview • Published project has current production state. • List of collaborators all have access to work on this project. • Change detected shows the preview, organization and layout only. • To preview on staging you ”Request to publish” – and repeat.
  • 24. © 2022 Cisco and/or its affiliates. All rights reserved. 24 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential editor.swagger.io • Online editor that validates. • Files can be YAML or JSON. • OAS training available for technical writers, engineers, product managers, and developers to learn the OpenAPI specification.
  • 25. JSON vs. YAML: Side-by-side YAML JSON
  • 26. © 2022 Cisco and/or its affiliates. All rights reserved. 26 © 2021 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Training: OAS v3 Elements OpenAPI 3.x info servers security paths tags externalDocs components
  • 28. © 2022 Cisco and/or its affiliates. All rights reserved. 28 OAS Elements: Info Example info
  • 29. © 2022 Cisco and/or its affiliates. All rights reserved. 29 Describes one or more API endpoints for cloud and on- premises APIs They may be a complete URL or use variable substitution OAS Elements: Servers (aka Hosts) servers
  • 30. © 2022 Cisco and/or its affiliates. All rights reserved. 30 Operation = Path + HTTP Method Query parameter • GET /alarms?active=true 200: Response with payload OAS Elements: Paths paths Learn more about status codes https://developer.cisco.com/apistyleguide/#rest-style/returning- http-status-codes
  • 31. © 2022 Cisco and/or its affiliates. All rights reserved. 32 Define reusable structures for request inputs and response outputs. Often referenced from operations or from one schema to another. Helpful for keeping “Don’t Repeat Yourself” DRY principles. OAS Elements: Schema Components components
  • 32. © 2022 Cisco and/or its affiliates. All rights reserved. 33 Four-day training is a deep dive Still need to version-control improvements if the spec is generated Reuse is possible with OAS OpenAPI Docs improvements OpenAPI 3.x info servers security paths tags externalDocs components
  • 33. © 2022 Cisco and/or its affiliates. All rights reserved. 34 What parts are difficult?
  • 34. © 2022 Cisco and/or its affiliates. All rights reserved. 35 • Teams compare one product API metrics to another, but they’re not similar. At all. • Engineers learn ”just enough” OpenAPI Specification to generate it automatically. Try to set it and forget it. • Automated testing is difficult! So far, we have only figured out half of the equation, the container half. API Docs are Hard Anyone who says otherwise, well…
  • 35. © 2022 Cisco and/or its affiliates. All rights reserved. 36 Getting Actionable Feedback • Was the information in the document accurate? • Was the information in the document relevant? • Was the information in the document easy to understand? • Could you find the information you needed in the document? Beyond Accuracy: What Documentation Quality Means to Readers February 2019 Technical Communication (Washington) 66(1):7-29 Accurate, Relevant, Easy to Understand, Accessible
  • 36. © 2022 Cisco and/or its affiliates. All rights reserved. 37 PowerBI Dashboard Metrics NPS = Net Promotor Score Promoter = 9 or 10 Passive = 8, 7, 6, 5, 4 Detractor = 3, 2, 1 Star Rating = 1-5 stars
  • 37. © 2022 Cisco and/or its affiliates. All rights reserved. 39 © 2022 Cisco and/or its affiliates. All rights reserved. Cisco Confidential Summary Process: Docs as Code, onboarding for documentation, infrastructure, developer experience needs. Authors: technical contributors on Enterprise GitHub. Output: developer.cisco.com landing pages, technical documentation, interactive API docs and interactive learning. Tools: Editors, IDEs, OpenAPI, Docker, PubHub, PowerBI, Git, and GitHub.
  • 38. © 2022 Cisco and/or its affiliates. All rights reserved. 40 Links • Documenting APIs: A guide for technical writers and engineers • Docs Like Code: https://docslikecode.com • GitHub Pages: https://pages.github.com • Meraki API Docs: https://developer.cisco.com/meraki/api-v1/ • Meraki OpenAPI Spec: https://github.com/meraki/openapi • Measuring documentation quality through user feedback: https://idratherbewriting.com/learnapidoc/docapis_measuring_impact.html Where to find out more We are hiring! https://cs.co/api-quality-job Scan for job link!
  • 39. © 2022 Cisco and/or its affiliates. All rights reserved. 41 Q&A
  • 40.
  • 41. © 2022 Cisco and/or its affiliates. All rights reserved. 43 Reference information
  • 42. © 2022 Cisco and/or its affiliates. All rights reserved. 44 Source • GitHub can do version control, but isn’t used on source files currently in the “GitHub tagged release” way. • Branches do let us have fine control of each change but that is not the same as version control. • We could automate source release production using the GitHub API. Output • PubHub has a way to indicate the version group for a PubHub project so that the output has a drop-down version menu. Version control
  • 43. © 2022 Cisco and/or its affiliates. All rights reserved. 45 Git • Version control technology • Widely used across the industry • Interaction with command line interface (CLI) or graphical user interface (GUI) • Services include: GitLab, BitBucket, and GitHub GitHub • Cloud-based git host • Public: github.com • Cisco enterprise: wwwin- github.cisco.com Git and GitHub as a CMS
  • 44. © 2022 Cisco and/or its affiliates. All rights reserved. 46 GitHub terms • Repository: A collection of content or code • Branch: A set of changes within a repository • Each branch has a unique name • Branch can exist locally and on GitHub • Commit: Saving changes at a point-in-time or a selected point of completion • Push: Sending a Commit to the collaborative GitHub UI for review • Merge: Adding the code from one branch to another • Pull Request: A collection of changes from a commit ready for review Useful vocabulary to have; quite specific to Git
  • 45. © 2022 Cisco and/or its affiliates. All rights reserved. 47 Content Authors Enterprise GitHub / github.com Content Source DevNet DevNet Site App Course App (Custom Render) Publish S3 (Public & Protected) CloudFront Metadata Service HTML/Web, Markdown, Swagger.. Preview + Publish Stage Editor/Approver Pubhub Authoring Editing Review Approve Render Versioning Search PubHub Architecture

Notes de l'éditeur

  1. 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.
  2. 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.
  3. 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.
  4. 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
  5. 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
  6. 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
  7. Demo
  8. Demo at https://developer.cisco.com/meraki/api-v1/#!get-organizations
  9. Demo at https://developer.cisco.com/learning/
  10. Lead engineer: Neelesh Pateriya 517: Published sites & doc sets 1491: Content Contributors 2175 Projects ≈92k Updates
  11. Image source: https://www.infoq.com/news/2017/01/openapi-3/
  12. 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
  13. 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?
  14. 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.
  15. 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
  16. 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
  17. 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
  18. 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?
  19. Also https://idratherbewriting.com/learnapidoc/docapis_measuring_impact.html
  20. 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.