IN A PERFECT WORLD WE SHOULDN’T HAVE TO READ API DOCS,
Slide 7
WE SHOULDN’T HAVE TO WRITE CODE TO CONSUME APIS.
Slide 8
BUT TODAY, APIS ARE STILL USED BY HUMANS 🙋
Slide 9
REMEMBER WHEN WE CHALLENGED THE VALUE OF WRITING TESTS? AND HOW MUCH TIME IT TAKES?
Slide 10
THE FIRST TIME I ASKED MY CEO TO TAKE TIME FOR TESTS ✋
Slide 11
Slide 12
TODAY, FOR MOST OF US, TESTING CODE IS JUST PART OF THE JOB.
Slide 13
FOR APIS DOCS, THE STORY IS A BIT DIFFERENT
Slide 14
PUBLIC APIS DOCS ARE A MARKETING TOOL
Slide 15
AND MARKETING IS RICH💰
Slide 16
MARKETING PEOPLE INVEST IN IT WITH TECHNICAL WRITERS, GREATS DESIGNS AND CUSTOM TOOLS
Slide 17
PRIVATE APIS DOCS AREN’T A MARKETING TOOL, BUT A DEV TOOL.
Slide 18
WHO CARES?
Slide 19
OUTDATED DOCS, HARD TO FIND, MISSING PARTS, BROKEN EXAMPLES…
Slide 20
AND SOMETIMES, NO DOC AT ALL.
Slide 21
AND IT’S NOT THE ONLY PROBLEM 😬
Slide 22
INSTEAD OF HAVING ONLY 1 API TO DEAL WITH, WE INVENTED MICRO SERVICES™ 😎
Slide 23
WE ARE DOOMED
Slide 24
Slide 25
PRS, WIKIS, SLACK, MEETINGS, AT THE COFFEE MACHINE…
Slide 26
WHY DO WE ALWAYS FAIL?
Slide 27
BECAUSE IT’S NOT ONLY ABOUT DOCS.
Slide 28
IT’S ABOUT
DESIGN
Slide 29
IT’S ABOUT
KNOWLEDGE
Slide 30
IT’S ABOUT
CHANGES COMMUNICATION AND PROPAGATION
Slide 31
IT’S ABOUT
CONTINUOUS TEST AND VALIDATION
Slide 32
IT’S ABOUT
SYNCHRONIZING A WHOLE ECOSYSTEM AROUND THE API.
Slide 33
API SPECIFICATIONS FTW✌
Slide 34
« AN API SPECIFICATION PROVIDES A BROAD UNDERSTANDING OF HOW AN API BEHAVES AND HOW THE API LINKS WITH OTHER APIS. IT EXPLAINS HOW THE API FUNCTIONS AND THE RESULTS TO EXPECT WHEN USING THE API » https://swagger.io/resources/articles/difference-between-api-documentation-specification/
Slide 35
n o i t i n i f e
d
« AN API SPECIFICATION PROVIDES A BROAD UNDERSTANDING OF HOW AN API BEHAVES AND HOW THE API LINKS WITH OTHER APIS. IT EXPLAINS HOW THE API FUNCTIONS AND THE RESULTS TO EXPECT WHEN USING THE API » https://swagger.io/resources/articles/difference-between-api-documentation-specification/
Slide 36
THE REST API SPECIFICATIONS BATTLE BLUEPRINT ⚡ RAML⚡ OPENAPI
Slide 37
OPENAPI 💪 PREVIOUSLY KNOWN AS SWAGGER https://spec.openapis.org/oas/v3.1.0.html
Slide 38
JSON / YAML
Slide 39
🎁
Slide 40
🎁
Slide 41
Slide 42
HOW DO WE WRITE IT?
Slide 43
CODE FIRST VS DESIGN FIRST
Slide 44
GENERATORS FROM CODE Exist for all languages, all frameworks.
Slide 45
EDITORS Vim, VSCode, Atom, <your favorite one> extensions for validation, linting, intellisense, … Specific editors, like Stoplight Studio or Insomnia.
Slide 46
STOPLIGHT STUDIO ❤
Slide 47
INSOMNIA
Slide 48
A LOT OF TOOLS
Slide 49
DOCS
ReDoc Swagger UI Widdershins + Slate or Shins.js SaaS tools like Stoplight, Readme or Bump.sh
Slide 50
Slide 51
LINTERS
more than just a linter
Spectral, github.com/stoplightio/spectral OpenAPI validator, https://github.com/IBM/openapi-validator