SlideShare a Scribd company logo
PAGEDAY2017/11/01#MOONGIFT/12
How to create the API document
from real API and localization
1
PAGEDAY2017/11/01#MOONGIFT/12
Who am I?
2
@goofmint
fb.me/goofmint
Atsushi Nakatsugawa
CEO at MOONGIFT
Organizer of DevRelCon Tokyo 2017/2018
Organizer of DevRel Meetup in Tokyo/Singapore/Sydney/Bangalore
PAGEDAY2017/11/01#MOONGIFT/12
! Give me your feedback! !
3
API THE DOCS, 9 November London
PAGEDAY2017/11/01#MOONGIFT/12
About this talk
• It is based on my experience
• I will share with you how to improving document
maintenance environment
• It’s not high level and no smart, but it’s realistic
4
PAGEDAY2017/11/01#MOONGIFT/12
First Situation
5
PAGEDAY2017/11/01#MOONGIFT/12
First situation
• API document is managed by GitHub Wiki
• Minimum quality, for their workers
• Ineffective maintenance document
6
PAGEDAY2017/11/01#MOONGIFT/12
GitHub Wiki
• 👍 Updating content on web browser and supporting version management.
• 👎 Dividing code and document. Don’t support pull request workflow.
• 👎 Don’t support localization.
7
PAGEDAY2017/11/01#MOONGIFT/12
Un documentation API
• Wiki didn’t cover everything and every update.
• Checking is very hard job that what is collect or not.
• Halfway document disturbs my job.
8
I've decided creating document from zero.
PAGEDAY2017/11/01#MOONGIFT/12
Specifications
9
PAGEDAY2017/11/01#MOONGIFT/12
Specifications
• Support English and Japanese
• Document has API, tutorials, usage and more
• Easy maintenance
10
PAGEDAY2017/11/01#MOONGIFT/12
Localization
• Make misunderstanding by no native language
• English speaking rate is too low in Japan (12%)
• Update document cost is very high (English to Japanese)
11
PAGEDAY2017/11/01#MOONGIFT/12
Translating is not localization
• Structure of sentence is completely different
• Many times, English needs longer sentence than Japanese
• Japanese has 3 types characters (Hiragana/Katakana/Kanji)
12
PAGEDAY2017/11/01#MOONGIFT/12
Document in Code
• 👍 Connecting code and document
• 👎 Too much comment in code for
documentation
• 👎 Programmer is NOT necessarily able
to write high readability document
• 👎 Most document generators don’t
support i18n.
13
desc 'Returns your public timeline.' do
summary 'summary'
detail 'more details'
params API::Entities::Status.documentation
success API::Entities::Entity
failure [[401, 'Unauthorized', 'Entities::Error']]
named 'My named route'
headers XAuthToken: {
description: 'Validates your identity',
required: true
},
XOptionalHeader: {
description: 'Not really needed',
required: false
}
hidden false
deprecated false
is_array true
nickname 'nickname'
produces ['application/json']
consumes ['application/json']
tags ['tag1', 'tag2']
end
get :public_timeline do
Status.limit(20)
end
PAGEDAY2017/11/01#MOONGIFT/12
Architecture
14
API
Swagger
OAS
GetText
Markdown
Static Site
Generator
PAGEDAY2017/11/01#MOONGIFT/12
Works
15
PAGEDAY2017/11/01#MOONGIFT/12
Architecture
16
API
Swagger
OAS
GetText
Markdown
Static Site
Generator
PAGEDAY2017/11/01#MOONGIFT/12
Real API to Swagger
• There is kitchen sink app
• Developer can learn how to use JavaScript SDK & API
17
PAGEDAY2017/11/01#MOONGIFT/12
Tool 1 : curlToSwagger
• Chrome provides curl command in Devtools
• Copy it
• Parse it
• Generate swagger document
18
https://github.com/goofmint/cURLtoSwagger
PAGEDAY2017/11/01#MOONGIFT/12
Tool 1 : curlToSwagger
• Chrome provides curl command in Devtools
• Copy it
• Parse it
• Generate swagger document
19
https://github.com/goofmint/cURLtoSwagger
curl ‘https://samples.openweathermap.org/data/2.5/forecast?
id=52...a1' 
-XGET 
-H 'Cookie: __utma=124); __utmt=1' 
-H 'Accept: text...q=0.8’ 
-H 'Accept-Encoding: gzip, deflate' 
-H 'Upgrade-Insecure-Requests: 1' 
-H 'Host: samples.openweathermap.org' 
-H 'User-Agent: Mozilla...15’ 
-H 'Accept-Language: ja-jp' 
-H 'DNT: 1' 
-H 'Connection: keep-alive'
PAGEDAY2017/11/01#MOONGIFT/12
Tool 1 : curlToSwagger
• Chrome provides curl command in Devtools
• Copy it
• Parse it
• Generate swagger document
20
https://github.com/goofmint/cURLtoSwagger
PAGEDAY2017/11/01#MOONGIFT/12
Tool 1 : curlToSwagger
• Chrome provides curl command in Devtools
• Copy it
• Parse it
• Generate swagger document
21
https://github.com/goofmint/cURLtoSwagger
PAGEDAY2017/11/01#MOONGIFT/12
Architecture
22
API
Swagger
OAS
GetText
Markdown
Static Site
Generator
PAGEDAY2017/11/01#MOONGIFT/12
Tool 2 : Swagger2Markdown
• Parse swagger file
• Pick up each sentences
• Make po file for translating (ja.po or en.po)
• Update po file
• Create English and Japanese Markdown files
23
https://github.com/goofmint/swagger2markdown
# vibration.md
msgid "Vibration API"
msgstr "Vibration API"
# vibration.md
msgid "### Basic specifications"
msgstr "### Basic specifications"
# vibration.md
msgid "API Path"
msgstr "API Path"
# vibration.md
msgid ": /gotapi/vibration/vibrate"
msgstr ": /gotapi/vibration/vibrate"
# vibration.md
msgid "Method"
msgstr "Method"
PAGEDAY2017/11/01#MOONGIFT/12
Tool 2 : Swagger2Markdown
• Parse swagger file
• Pick up each sentences
• Make po file for translating (ja.po or en.po)
• Update po file
• Create English and Japanese Markdown files
24
https://github.com/goofmint/swagger2markdown
# vibration.md
msgid "Vibration API"
msgstr "バイブレーション API"
# vibration.md
msgid "### Basic specifications"
msgstr "### 基本仕様"
# vibration.md
msgid "API Path"
msgstr "APIパス"
# vibration.md
msgid ": /gotapi/vibration/vibrate"
msgstr ": /gotapi/vibration/vibrate"
# vibration.md
msgid "Method"
msgstr "メソッド"
PAGEDAY2017/11/01#MOONGIFT/12
Architecture
25
API
Swagger
OAS
GetText
Markdown
Static Site
Generator
PAGEDAY2017/11/01#MOONGIFT/12
Why Markdown?
• Most swagger based document generators don’t support localization.
• Many static site generators support Markdown format
• We can add more contents like tutorials, getting started, SDK help and more!
• We choose MkDocs for documentation.
26
https://www.mkdocs.org
PAGEDAY2017/11/01#MOONGIFT/12
Conclusion
27
PAGEDAY2017/11/01#MOONGIFT/12
API to Document
• Document is not code
• Too many comments lower readability of code
• Test code or kitchen sink is good tutorial for programmers
• 1 correct code is more worth than 100 words
28
PAGEDAY2017/11/01#MOONGIFT/12
Localization
• 👍 It’s very important for non-native English speakers
• 👍 It’s easy to create just one time
• 👎 It’s difficult to update document immediately
29
PAGEDAY2017/11/01#MOONGIFT/12
Thanks! $
30

More Related Content

What's hot (20)

PDF
Scaling up development of a modular code base
Robert Munteanu
 
PDF
Let your REST API talk @java2days
Nikolay Petkov
 
PPTX
Understanding how to use Swagger and its tools
Swagger API
 
PDF
Bootstrapping your plugin
Marko Heijnen
 
PDF
Building plugins like a pro
Marko Heijnen
 
PDF
Getting Started with React Native (and should I use it at all?)
Devin Abbott
 
PDF
What's This React Native Thing I Keep Hearing About?
Evan Stone
 
PDF
The Grapes of Rapid (RubyConf 2010)
Michael Bleigh
 
PDF
Collaborative Development: The Only CD That Matters - Brent Beer - Codemotion...
Codemotion
 
PPTX
Introduce cucumber
Bachue Zhou
 
PDF
Android clean architecture workshop 3h edition
Jorge Ortiz
 
PDF
GraphQL Story: Intro To GraphQL
Riza Fahmi
 
PDF
Let's Graph
Fabien de Maestri
 
PPTX
Ofir Dagan - (Don’t) Blame it on React Native - Codemotion Rome 2019
Codemotion
 
PDF
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Codemotion
 
PPTX
Integration of automation framework with ci tools
vodQA
 
PPTX
React Native.pptx (2)
Emilio Rodriguez Martinez
 
PDF
React Native "A Bad Idea Or A Game Changer" at Code Mania 101
Ranatchai Chernbamrung
 
PDF
Jedi Mind Tricks in Git
Johan Abildskov
 
PDF
Creating BananaJS with Angular 2, Angular CLI, and Material Design
Tracy Lee
 
Scaling up development of a modular code base
Robert Munteanu
 
Let your REST API talk @java2days
Nikolay Petkov
 
Understanding how to use Swagger and its tools
Swagger API
 
Bootstrapping your plugin
Marko Heijnen
 
Building plugins like a pro
Marko Heijnen
 
Getting Started with React Native (and should I use it at all?)
Devin Abbott
 
What's This React Native Thing I Keep Hearing About?
Evan Stone
 
The Grapes of Rapid (RubyConf 2010)
Michael Bleigh
 
Collaborative Development: The Only CD That Matters - Brent Beer - Codemotion...
Codemotion
 
Introduce cucumber
Bachue Zhou
 
Android clean architecture workshop 3h edition
Jorge Ortiz
 
GraphQL Story: Intro To GraphQL
Riza Fahmi
 
Let's Graph
Fabien de Maestri
 
Ofir Dagan - (Don’t) Blame it on React Native - Codemotion Rome 2019
Codemotion
 
Matteo Manchi - React Native for multi-platform mobile applications - Codemot...
Codemotion
 
Integration of automation framework with ci tools
vodQA
 
React Native.pptx (2)
Emilio Rodriguez Martinez
 
React Native "A Bad Idea Or A Game Changer" at Code Mania 101
Ranatchai Chernbamrung
 
Jedi Mind Tricks in Git
Johan Abildskov
 
Creating BananaJS with Angular 2, Angular CLI, and Material Design
Tracy Lee
 

Similar to How to Create the API Document from Real API and Localization (20)

PDF
apidays LIVE India 2022_Creating API documentation for international communit...
apidays
 
PPTX
API workshop: Introduction to APIs (TC Camp)
Tom Johnson
 
PDF
Creating API documentation for international communities
Pronovix
 
PPTX
API Description Languages: Which is the Right One for Me?
Akana
 
PPTX
API Description Languages: Which is the Right One for Me?
Akana
 
PPTX
Swagger - Making REST APIs friendlier
Miroslav Resetar
 
PPTX
Rest API with Swagger and NodeJS
Luigi Saetta
 
ODP
Swagger demo
Joe Conley
 
PPTX
Another API-Blueprint, RAML and Swagger Comparison
SmartBear
 
PDF
Enforcing API Design Rules for High Quality Code Generation
Tim Burks
 
PDF
API Description Languages
Akana
 
PDF
API Description Languages
Akana
 
PDF
API Description Languages: Which Is The Right One For Me?
ProgrammableWeb
 
PDF
go + swaggerでAPIサーバーを作ってみる
虎の穴 開発室
 
PDF
JSON API Specificiation
Wojciech Langiewicz
 
PPTX
Everybody loves Swagger
BizTalk360
 
PPTX
Scaling with swagger
Tony Tam
 
PDF
Streamlining API with Swagger.io
Victor Augusteo
 
PDF
INTERFACE, by apidays - Building an Accessible API Spec
apidays
 
PPTX
Love your API with Swagger (Gluecon lightning talk)
Tony Tam
 
apidays LIVE India 2022_Creating API documentation for international communit...
apidays
 
API workshop: Introduction to APIs (TC Camp)
Tom Johnson
 
Creating API documentation for international communities
Pronovix
 
API Description Languages: Which is the Right One for Me?
Akana
 
API Description Languages: Which is the Right One for Me?
Akana
 
Swagger - Making REST APIs friendlier
Miroslav Resetar
 
Rest API with Swagger and NodeJS
Luigi Saetta
 
Swagger demo
Joe Conley
 
Another API-Blueprint, RAML and Swagger Comparison
SmartBear
 
Enforcing API Design Rules for High Quality Code Generation
Tim Burks
 
API Description Languages
Akana
 
API Description Languages
Akana
 
API Description Languages: Which Is The Right One For Me?
ProgrammableWeb
 
go + swaggerでAPIサーバーを作ってみる
虎の穴 開発室
 
JSON API Specificiation
Wojciech Langiewicz
 
Everybody loves Swagger
BizTalk360
 
Scaling with swagger
Tony Tam
 
Streamlining API with Swagger.io
Victor Augusteo
 
INTERFACE, by apidays - Building an Accessible API Spec
apidays
 
Love your API with Swagger (Gluecon lightning talk)
Tony Tam
 
Ad

More from Pronovix (20)

PDF
By the time they're reading the docs, it's already too late
Pronovix
 
PPTX
Optimizing Dev Portals with Analytics and Feedback
Pronovix
 
PPTX
Success metrics when launching your first developer portal
Pronovix
 
PDF
Documentation, APIs & AI
Pronovix
 
PDF
Making sense of analytics for documentation pages
Pronovix
 
PPTX
Feedback cycles and their role in improving overall developer experiences
Pronovix
 
PDF
GraphQL Isn't An Excuse To Stop Writing Docs
Pronovix
 
PPTX
API Documentation For Web3
Pronovix
 
PDF
Why your API doesn’t solve my problem: A use case-driven API design
Pronovix
 
PDF
unREST among the docs
Pronovix
 
PDF
Developing a best-in-class deprecation policy for your APIs
Pronovix
 
PDF
Annotate, Automate & Educate: Driving generated OpenAPI docs to benefit everyone
Pronovix
 
PDF
What do developers do when it comes to understanding and using APIs?
Pronovix
 
PDF
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Pronovix
 
PDF
One Developer Portal to Document Them All
Pronovix
 
PDF
Docs-as-Code: Evolving the API Documentation Experience
Pronovix
 
PDF
Developer journey - make it easy for devs to love your product
Pronovix
 
PPTX
Complexity is not complicatedness
Pronovix
 
PDF
How cognitive biases and ranking can foster an ineffective architecture and d...
Pronovix
 
PDF
APIs: Semi-permeable, osmotic interfaces
Pronovix
 
By the time they're reading the docs, it's already too late
Pronovix
 
Optimizing Dev Portals with Analytics and Feedback
Pronovix
 
Success metrics when launching your first developer portal
Pronovix
 
Documentation, APIs & AI
Pronovix
 
Making sense of analytics for documentation pages
Pronovix
 
Feedback cycles and their role in improving overall developer experiences
Pronovix
 
GraphQL Isn't An Excuse To Stop Writing Docs
Pronovix
 
API Documentation For Web3
Pronovix
 
Why your API doesn’t solve my problem: A use case-driven API design
Pronovix
 
unREST among the docs
Pronovix
 
Developing a best-in-class deprecation policy for your APIs
Pronovix
 
Annotate, Automate & Educate: Driving generated OpenAPI docs to benefit everyone
Pronovix
 
What do developers do when it comes to understanding and using APIs?
Pronovix
 
Inclusive, Accessible Tech: Bias-Free Language in Code and Configurations
Pronovix
 
One Developer Portal to Document Them All
Pronovix
 
Docs-as-Code: Evolving the API Documentation Experience
Pronovix
 
Developer journey - make it easy for devs to love your product
Pronovix
 
Complexity is not complicatedness
Pronovix
 
How cognitive biases and ranking can foster an ineffective architecture and d...
Pronovix
 
APIs: Semi-permeable, osmotic interfaces
Pronovix
 
Ad

Recently uploaded (20)

PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
PDF
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
PDF
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PPTX
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
PDF
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
DOCX
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
PPTX
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
PDF
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Safe Software
 
“Voice Interfaces on a Budget: Building Real-time Speech Recognition on Low-c...
Edge AI and Vision Alliance
 
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
Safe Software
 
The Rise of AI and IoT in Mobile App Tech.pdf
IMG Global Infotech
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
NLJUG Speaker academy 2025 - first session
Bert Jan Schrijver
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
MuleSoft MCP Support (Model Context Protocol) and Use Case Demo
shyamraj55
 
How do you fast track Agentic automation use cases discovery?
DianaGray10
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Python coding for beginners !! Start now!#
Rajni Bhardwaj Grover
 
Mastering ODC + Okta Configuration - Chennai OSUG
HathiMaryA
 
SIZING YOUR AIR CONDITIONER---A PRACTICAL GUIDE.pdf
Muhammad Rizwan Akram
 

How to Create the API Document from Real API and Localization