OpenAPI:
An Early Design Feedback Engine
Lukas Rosenstock
2023 SERIES OF EVENT
New York
May 16&17
Australia
October 11&12
Singapore
April 12&13
Helsinki & North
June 5&6
Paris
SEPTEMBER
London
November
15&16
June 28-30
SILICON VALLEY
March 14&15
Dubai & Middle East
February 22&23
machine-readable
YAML file =
Single Source of Truth
Manual
Writing
Visual
Tools
API
Design
Docs
Reference
Code
Stubs & SDKs;
Input/Output
Validation
Tests &
Monitoring
Code
+ annotations
Design > Documentation
Design > Documentation > DevPortal
Bad Design:
Documentation as
“Damage Control”
Bad Documentation:
DevPortal can only be as
good as its content
Good Design + Good Documentation
+ Good DevPortal = 😀😀😀
Design ➡️ Documentation ➡️ DevPortal
How to design an API?
What are
the APIs
use cases?
Which data
shall we
expose?
Who are our
developer
personas?
Will this API be a
monetized product?
How does the API
fit in our existing
ecosystem?
Involve all
stakeholders
(Product Owner, Developers, QA, Subject Matter
Experts, Business Analysists, Enterprise
Architects, Technical Writers, Developer
Advocates & Developer Success Roles …)
Talk about personas, use
cases etc. before writing
an OpenAPI definition
Change is inevitable!
We should discuss
preparing for an
upcoming business
requirement …
I think we completely
forgot the DELETE
endpoint.
Adding this field to the user
collection endpoint would
make my frontend code more
efficient.
This would be difficult to
explain in documentation.
Why not try something
else?
This meeting should have been an email
a change management system
Requirements
• Single Source of Truth
• Suggest and compare changes
• Build consensus
• Review what changed
Docs-as-Code 🤔
OpenAPI = Docs (+ X)
GitHub Workflow
• Single Source of Truth ➡️ definition repository‘s main branch
• Suggest and compare changes ➡️ pull requests
• from stakeholder branch
• Build consensus ➡️ accept and merge pull requests
• Review what changed ➡️ commit history / diff
Review of Changes
• Is this clear or needs
discussion/research?
• Does the change make sense?
• Is it breaking?
Early Feedback Mechanism 1:
Stakeholder Review in Git(Hub)
Will/can every stakeholder
use Git(Hub)?! 🤔
CI/CD Pipeline (e.g. GitHub Actions)
• Check your API definition to ensure it‘s always valid
• Well-formed API follow custom rules (API guidelines)
• Tools: Spectral etc.
• Run automated tests to keep implementation and definition in sync
• Set up a mock server to serve static API responses
• Generate documentation (e.g. Redoc/Swagger) and publish it
Early Feedback Mechanism 2:
The (internal) DevPortal
Pipeline
Repository
API
Stakeholders
DevPortal
Using the DevPortal prior to implementation
• (Internal) Developers can review upcoming APIs
• Even test with mock server
• Easier access/UI compared to Git(Hub)
• Required: alternate feedback process
• Documentation Preview on DevPortal
• Think API backend implementation and developer experience together
• Build up interest prior to release
Repository
inner circle of stakeholders
DevPortal
outer circle of stakeholders
Shameless plug:
Feedback?!
• Twitter: @LukasRosenstock
• Mastodon/Fediverse: @lukas@indieweb.social
• E-Mail: lukas@rosenstock.email

apidays Paris 2022 - OpenAPI: An Early Design Feedback Engine, Lukas Rosenstock, Author