SlideShare a Scribd company logo
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
API Description Languages!
Laura Heritage!
Director of API Strategy!
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
What is an API Description Language (API DL)?!
Contract Human DocsMetadataBlueprint
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
What About WSDL2.0 or WADL?!
•  For REST, they are not widely adopted
•  Both are not very “humanly readable”
•  Both are typically auto-generate from code – wouldn’t use
them as a “blueprint” amongst non-technical types
•  WADL doesn’t contain enough information to adequately
describe a RESTful API. Though does have extension points
which are seldom used.
•  WSDL contains almost everything you need but is quite
brittle. If it changes the clients must change too
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
API DL Brings REST to the Enterprise!
“Lack of a way to describe a RESTful services was one of the
largest barriers to REST adoption in the enterprise.”
Governable ReadableShareable
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Many API DL Are Available Today!
Hypermedia
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Most Active API DL Communities!
API-Blueprint RAML* SWAGGER*
Format Markdown YAML JSON
Available at GitHub GitHub GitHub
Sponsored by Apiary Mulesoft Reverb
Current Version 1A3 0.8 1.2
Workgroup No Yes Yes
Initial commit April, 2013 Sep, 2013 July, 2011
API Design
Approach
Top-down Top-down **Bottom-up
* Most Widely Adopted by Enterprises
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
How Do You Choose?!
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Define Key Purpose Behind Using an API DL!
SWAGGER RAML
I need the ability to design the API with technically limited API
stakeholders
-
(new top down tooling
being developed)
X
I want a way to describe and design an API with my technical
team
X X
(has more advanced
meta data constructs
(includes, inheritance,
traits))
I need to validate the requests and responses at runtime X
(swagger-node-
express, swagger -
Play)
X
(Osprey)
I need to easily consume the API specification between two or
more systems
X X
I need documentation for audit and compliance X X
I need exceptional external API developer experiences X X
I need to generate server code X
(node.js, Java)
X
(node.js, Java)
I need to generate client code X limited
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Understand How Your Team Works!
SWAGGER RAML
Do you design before you
code?
- X
Do you generate documents
after you code from your
code?
X X
(early release of JAXRS-to-
RAML)
Do you want docs embedded
in your server code?
X -
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Look At Their Community!
•  Swagger by far has the largest community, since its been around since 2011
•  RAML has gained traction in the enterprise due to the richness of its modeling
capability; API version metatdata, nested resources, composition and inheritance, file
inclusions and top down approach
Generators
SWAGGER RAML
Documentation From Code Clojure, ColdFusion/CFML,
Eiffel, Go, Java, .Net,
Node.js, PHP, Python,
Ruby, Scala
JAX-RS
Spec Parsers Java, js PHP, Ruby, Phython, Java,
Javascript
API Interfaces Java, Node.js Java, Node.js
Client Code Several Developing
Editor Tooling *new in the works based
on YAML, demo’d in May
API Designer, Sublime plugin,
Atom
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
In Action – What Is the Experience?!
•  WishList Application
–  Add a User
–  Get Users
–  Add a wish
–  Get all wishes in the system
–  Get wishes for particular user
•  Filter by price range
•  Filter by merchant
•  Platform : Node.js, Express and Mongo
•  Test
–  Build with RAML
–  Build with SWAGGER Reese’s Birthday Soon
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
My Background !
•  Degree in Computer Science & Mathematic
•  16 years @IBM and 5 Months at @SOASoftwareInc
•  14+ years working with SOAP/REST, SOA, API
•  Over the years I have been a developer, an architect, a
competitive technical sales, a product manager and an
evangelist
•  I always liked to be on the bleeding of edge technology
•  Very hands on
•  I would consider myself a “Sunday” developer. I don’t get to
code as often as I use to. Now I mostly configure products
and do scripting.
•  Spend most of my time working with customer.
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
RAML!
Start with tutorial at RAML.org
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
RAML Editors!
•  API Designer -
http://api-portal.anypoint.mulesoft.com/raml/api-
designer
–  (allows for mocking)
•  Sublime Editor
https://github.com/mulesoft/raml-sublime-
plugin
NOTE: Indentation matters in both
•  Can have 1 to many files
•  I have a very simple API.
I kept mine in 1. Didn’t
use includes, but did play
with them
•  No Security
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Document Generation!
•  RAML to HTML
•  RAML to HTML - PHP
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Thoughts on RAML Experience!
•  Great documentation, samples and tutorial
•  Good way to model your API
–  When writing my server code, I did find I went back to my RAML model to
remember what I was suppose to be doing.
•  It is easy to understand and write, from the basic API perspective.
–  When you get into Includes, Traits, it becomes a little more technical.
•  Community tools
–  Are easy to understand, install and work with.
–  I played with:
•  API Designer
•  RAML Sublime Plugin
•  RAML to HTML
•  Swagger2raml
•  Osprey / Osprey CLI
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
SWAGGER!
Swagger Community
•  https://github.com/wordnik/swagger-spec
Swagger Getting Started
•  https://github.com/wordnik/swagger-spec/wiki
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Three Ways To Create Swagger!
1.  Codegen: Traditional way of creating a Swagger Specification.
The swagger codegen converts annotation in your code to
Swagger Specification
2.  Automatically: swagger-node-express and swagger-play will
create both your REST APIs and your Swagger Specification for
you at the same time
–  https://www.npmjs.org/package/swagger-node-express
3.  Manually: Write the json by hand.
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Used swagger-node-express!
•  Server.js – the node-
express server
•  Model.js - describes
the resources (User,
Wish)
•  Resource.js – defines
the actions for the
resources
Spec
Action
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Swagger Documentation!
Composed of two files:
•  Resource Listing: Lists the APIs that are available and gives a brief
description of the them.
•  API Description: Detailed description of each API in the Resource
Listing.
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Thoughts on SWAGGER Experience!
•  Most widely used API DL to date
•  On working with swagger-node-express:
–  Once you get the hang of it, went smooth and very fun to see results.
–  Key is to get your model.js (resource definitions) and your routes.js for your
data access specified correctly.
–  Definitely not top down. I ended up using my RAML spec to keep me on track.
–  Con - you are really embedding swagger throughout your code. Code which
may live forever, but will swagger?
•  On Codegen creation of swagger:
–  Easy self-explanatory
–  Is still a bottom up approach. Even though you are stubbing out your code as
you are modeling it, it is hard to share and express thoughts with out a lot of
effort up front.
•  Swagger-UI is very useful to help visualize and test your API
•  If you have complex APIs, swagger probably won’t have the the
constructs you need to fully express them.
•  Writing swagger manually in JSON is not fun. It is not very human
readable. A new Swagger Editor project was launched in May.
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Where to do documentation?!
Pros Cons
Document in design and
generate interface and docs
from design
•  Allows for changing docs
without disturbing
production code.
•  Allows for NLS translation
outside of production cycles
•  If backend implementation
changes but interface still
the same, you are okay.
Documentation can get out of
sync with what is running in
production.
Document in code and
generate docs from code
•  Documentation is more
likely to stay in sync with
what is in production
•  If issues with
documentation, need to
edit production code to
regenerate
Embed documentation in
server code and have server
dynamically serve up docs
•  Documentation is more
likely to stay in sync
because it is embedded and
running as part of the
application
•  You are now tied to that
particular API DL
implementation running
your production code
•  If there is user
documentation errors,
production changes are a
must
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
Thoughts On the API DL Focused on Today!
•  All the API DL are starting to provide similar features and functions.
They will continue to get closer and closer.
•  Neither specifications that we focused on today can describe
anything other then a RESTful API/Service.
–  For SOAP based APIs WSDL is still king. An API Platform you choose
should support SOAP based APIs via WSDL as well.
•  Neither specification provides ability for extension, for example:
describing testing and monitoring of the operations
•  Neither specification handles National Language (NLS) of
documentation
•  System to System interactions – Today mostly focused on API
creation and developer consumption. Next step is for system-to-
system integrations
Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved.
References!
•  Another API-Blueprint, RAML, Swagger Comparison – Ole
Lensmar
•  Investigating API Developer Tooling - @DanMayer
Copyright © 2001-2014 SOA Software, Inc. All Rights Reserved.
Questions!

More Related Content

PPTX
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
PPTX
ELK Stack
PDF
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
PDF
AWS EC2
PPTX
Dynamodb Presentation
PDF
Spark sql
PDF
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
PDF
Real-time Analytics with Upsert Using Apache Kafka and Apache Pinot | Yupeng ...
Event-Driven Messaging and Actions using Apache Flink and Apache NiFi
ELK Stack
Aurora는 어떻게 다른가 - 김일호 솔루션즈 아키텍트:: AWS Cloud Track 3 Gaming
AWS EC2
Dynamodb Presentation
Spark sql
Amazon EKS로 간단한 웹 애플리케이션 구축하기 - 김주영 (AWS) :: AWS Community Day Online 2021
Real-time Analytics with Upsert Using Apache Kafka and Apache Pinot | Yupeng ...

What's hot (20)

PDF
AWS 기반 마이크로 프론트엔드 아키텍처 구축하기
PDF
KNIME Data Science Learnathon: From Raw Data To Deployment
PDF
New Features in Apache Pinot
PDF
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
PDF
Microservices & API Gateways
PDF
Event Driven-Architecture from a Scalability perspective
PDF
Natural language processing
PDF
Chunking, Embeddings, and Vector Databases
PPTX
Tutorial on query auto-completion
PDF
AWS Single Sign-On (SSO) 서비스 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
PDF
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
PDF
Solving Enterprise Data Challenges with Apache Arrow
PPTX
Fine tuning large LMs
PDF
Introduction to Elasticsearch
PPTX
Walking the Way from Process Mining to AI-Driven Process Optimization
PDF
DASK and Apache Spark
PDF
Understanding LLMOps-Large Language Model Operations
PPTX
GCP IAM.pptx
PPTX
website phishing by NR
PPTX
The evolution of the big data platform @ Netflix (OSCON 2015)
AWS 기반 마이크로 프론트엔드 아키텍처 구축하기
KNIME Data Science Learnathon: From Raw Data To Deployment
New Features in Apache Pinot
Amazon OpenSearch Deep dive - 내부구조, 성능최적화 그리고 스케일링
Microservices & API Gateways
Event Driven-Architecture from a Scalability perspective
Natural language processing
Chunking, Embeddings, and Vector Databases
Tutorial on query auto-completion
AWS Single Sign-On (SSO) 서비스 집중 탐구 - 윤석찬 :: AWS Unboxing 온라인 세미나
Aws glue를 통한 손쉬운 데이터 전처리 작업하기
Solving Enterprise Data Challenges with Apache Arrow
Fine tuning large LMs
Introduction to Elasticsearch
Walking the Way from Process Mining to AI-Driven Process Optimization
DASK and Apache Spark
Understanding LLMOps-Large Language Model Operations
GCP IAM.pptx
website phishing by NR
The evolution of the big data platform @ Netflix (OSCON 2015)
Ad

Viewers also liked (20)

PPTX
Another API-Blueprint, RAML and Swagger Comparison
PDF
Design Driven API Development
PDF
Ultimate Guide to 30+ API Documentation Solutions
PPTX
API Description Languages: Which is the Right One for Me?
PDF
API Docs Made Right / RAML - Swagger rant
PPTX
Is it time for a Connector-less Approach to Cloud Integration?
PPTX
Platform for Secure Digital Business
PPTX
Realizing SOA and API Convergence
PPTX
Powering Internal API Communities
PPTX
Manage Your Mesh
PPTX
API Frenzy: API Strategy 101
PDF
Introducing Bonsai
PPTX
Generating the mule flow as html document
PPTX
What is Mule ESB
PDF
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
PPT
Smart Gamification
PDF
Getting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
PPTX
VRとWeb API
PDF
API Governance
PDF
オープンイノベーション事例 アップル
Another API-Blueprint, RAML and Swagger Comparison
Design Driven API Development
Ultimate Guide to 30+ API Documentation Solutions
API Description Languages: Which is the Right One for Me?
API Docs Made Right / RAML - Swagger rant
Is it time for a Connector-less Approach to Cloud Integration?
Platform for Secure Digital Business
Realizing SOA and API Convergence
Powering Internal API Communities
Manage Your Mesh
API Frenzy: API Strategy 101
Introducing Bonsai
Generating the mule flow as html document
What is Mule ESB
PiterPy 2016: Parallelization, Aggregation and Validation of API in Python
Smart Gamification
Getting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
VRとWeb API
API Governance
オープンイノベーション事例 アップル
Ad

Similar to API Description Languages (20)

PDF
API Description Languages: Which Is The Right One For Me?
PPTX
API Description Languages: Which is the Right One for Me?
PDF
Rest api design by george reese
PDF
Punta Dreamin 17 Generic Apex and Tooling Api
PPTX
Building a REST API for Longevity
PPTX
Swagger APIs for Humans and Robots (Gluecon)
PPTX
Are APIs and SOA Converging?
PPTX
Are APIs and SOA Converging?
PPTX
Are APIs and SOA Converging
PDF
Write Generic Code with the Tooling API
PPT
Web servicesoverview
PPTX
API and SOA: Two sides of the same coin
PPTX
API and SOA: Two Sides of the Same Coin?
PPT
Web servicesoverview
PPTX
API workshop: Introduction to APIs (TC Camp)
PDF
SGCE 2015 REST APIs
PDF
APIs distribuidos con alta escalabilidad
PPTX
How Open Source Embiggens Salesforce.com
PDF
Toronto node js_meetup
PDF
Building Your API for Longevity
API Description Languages: Which Is The Right One For Me?
API Description Languages: Which is the Right One for Me?
Rest api design by george reese
Punta Dreamin 17 Generic Apex and Tooling Api
Building a REST API for Longevity
Swagger APIs for Humans and Robots (Gluecon)
Are APIs and SOA Converging?
Are APIs and SOA Converging?
Are APIs and SOA Converging
Write Generic Code with the Tooling API
Web servicesoverview
API and SOA: Two sides of the same coin
API and SOA: Two Sides of the Same Coin?
Web servicesoverview
API workshop: Introduction to APIs (TC Camp)
SGCE 2015 REST APIs
APIs distribuidos con alta escalabilidad
How Open Source Embiggens Salesforce.com
Toronto node js_meetup
Building Your API for Longevity

More from Akana (20)

PDF
Delivering on Personalization with the Power of APIs
PPTX
A New Breed of Technical Leaders: The 101 to Defining Your API Business Stra...
PPTX
The Business Value for Internal APIs in the Enterprise
PPTX
Lifecycle Manager and the Lifecycle API
PPTX
Enterprise API Adoption Patterns
PPTX
Intermediary for Microsoft: Product Overview and Demo
PPTX
API Security: Securing Digital Channels and Mobile Apps Against Hacks
PPTX
Driving Business Partner Adoption with APIs
PPTX
Jumping Ahead with Enterprise APIs
PPTX
The Datacenter API
PPTX
Turbo Charge DataPower to Reach Your SOA Goals
PPTX
The API Economy is Here: Facebook, Twitter, Netflix and Your IT Enterprise
PPTX
Using APIs
PPTX
Using APIs for better Business Partnerships
PPTX
API Security: Does My Business Need OAuth?
PPTX
Best Practices: The Role of API Management
PPTX
API Management - A Transformation
PPTX
A Peek Into The Future of Mobile-Enabled Health Care
PPTX
Unified Security for Mobile, APIs and the Web
PPTX
API Frenzy: The Implications and Planning for a Successful API Strategy
Delivering on Personalization with the Power of APIs
A New Breed of Technical Leaders: The 101 to Defining Your API Business Stra...
The Business Value for Internal APIs in the Enterprise
Lifecycle Manager and the Lifecycle API
Enterprise API Adoption Patterns
Intermediary for Microsoft: Product Overview and Demo
API Security: Securing Digital Channels and Mobile Apps Against Hacks
Driving Business Partner Adoption with APIs
Jumping Ahead with Enterprise APIs
The Datacenter API
Turbo Charge DataPower to Reach Your SOA Goals
The API Economy is Here: Facebook, Twitter, Netflix and Your IT Enterprise
Using APIs
Using APIs for better Business Partnerships
API Security: Does My Business Need OAuth?
Best Practices: The Role of API Management
API Management - A Transformation
A Peek Into The Future of Mobile-Enabled Health Care
Unified Security for Mobile, APIs and the Web
API Frenzy: The Implications and Planning for a Successful API Strategy

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Advanced Soft Computing BINUS July 2025.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Approach and Philosophy of On baking technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Modernizing your data center with Dell and AMD
PPT
Teaching material agriculture food technology
PDF
Advanced IT Governance
PDF
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
PDF
KodekX | Application Modernization Development
PDF
Empathic Computing: Creating Shared Understanding
PDF
Machine learning based COVID-19 study performance prediction
cuic standard and advanced reporting.pdf
Advanced Soft Computing BINUS July 2025.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Understanding_Digital_Forensics_Presentation.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Approach and Philosophy of On baking technology
NewMind AI Weekly Chronicles - August'25 Week I
Mobile App Security Testing_ A Comprehensive Guide.pdf
Review of recent advances in non-invasive hemoglobin estimation
Per capita expenditure prediction using model stacking based on satellite ima...
Modernizing your data center with Dell and AMD
Teaching material agriculture food technology
Advanced IT Governance
solutions_manual_-_materials___processing_in_manufacturing__demargo_.pdf
KodekX | Application Modernization Development
Empathic Computing: Creating Shared Understanding
Machine learning based COVID-19 study performance prediction

API Description Languages

  • 1. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. API Description Languages! Laura Heritage! Director of API Strategy!
  • 2. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. What is an API Description Language (API DL)?! Contract Human DocsMetadataBlueprint
  • 3. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. What About WSDL2.0 or WADL?! •  For REST, they are not widely adopted •  Both are not very “humanly readable” •  Both are typically auto-generate from code – wouldn’t use them as a “blueprint” amongst non-technical types •  WADL doesn’t contain enough information to adequately describe a RESTful API. Though does have extension points which are seldom used. •  WSDL contains almost everything you need but is quite brittle. If it changes the clients must change too
  • 4. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. API DL Brings REST to the Enterprise! “Lack of a way to describe a RESTful services was one of the largest barriers to REST adoption in the enterprise.” Governable ReadableShareable
  • 5. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Many API DL Are Available Today! Hypermedia
  • 6. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Most Active API DL Communities! API-Blueprint RAML* SWAGGER* Format Markdown YAML JSON Available at GitHub GitHub GitHub Sponsored by Apiary Mulesoft Reverb Current Version 1A3 0.8 1.2 Workgroup No Yes Yes Initial commit April, 2013 Sep, 2013 July, 2011 API Design Approach Top-down Top-down **Bottom-up * Most Widely Adopted by Enterprises
  • 7. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. How Do You Choose?!
  • 8. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Define Key Purpose Behind Using an API DL! SWAGGER RAML I need the ability to design the API with technically limited API stakeholders - (new top down tooling being developed) X I want a way to describe and design an API with my technical team X X (has more advanced meta data constructs (includes, inheritance, traits)) I need to validate the requests and responses at runtime X (swagger-node- express, swagger - Play) X (Osprey) I need to easily consume the API specification between two or more systems X X I need documentation for audit and compliance X X I need exceptional external API developer experiences X X I need to generate server code X (node.js, Java) X (node.js, Java) I need to generate client code X limited
  • 9. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Understand How Your Team Works! SWAGGER RAML Do you design before you code? - X Do you generate documents after you code from your code? X X (early release of JAXRS-to- RAML) Do you want docs embedded in your server code? X -
  • 10. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Look At Their Community! •  Swagger by far has the largest community, since its been around since 2011 •  RAML has gained traction in the enterprise due to the richness of its modeling capability; API version metatdata, nested resources, composition and inheritance, file inclusions and top down approach Generators SWAGGER RAML Documentation From Code Clojure, ColdFusion/CFML, Eiffel, Go, Java, .Net, Node.js, PHP, Python, Ruby, Scala JAX-RS Spec Parsers Java, js PHP, Ruby, Phython, Java, Javascript API Interfaces Java, Node.js Java, Node.js Client Code Several Developing Editor Tooling *new in the works based on YAML, demo’d in May API Designer, Sublime plugin, Atom
  • 11. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. In Action – What Is the Experience?! •  WishList Application –  Add a User –  Get Users –  Add a wish –  Get all wishes in the system –  Get wishes for particular user •  Filter by price range •  Filter by merchant •  Platform : Node.js, Express and Mongo •  Test –  Build with RAML –  Build with SWAGGER Reese’s Birthday Soon
  • 12. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. My Background ! •  Degree in Computer Science & Mathematic •  16 years @IBM and 5 Months at @SOASoftwareInc •  14+ years working with SOAP/REST, SOA, API •  Over the years I have been a developer, an architect, a competitive technical sales, a product manager and an evangelist •  I always liked to be on the bleeding of edge technology •  Very hands on •  I would consider myself a “Sunday” developer. I don’t get to code as often as I use to. Now I mostly configure products and do scripting. •  Spend most of my time working with customer.
  • 13. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. RAML! Start with tutorial at RAML.org
  • 14. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. RAML Editors! •  API Designer - http://api-portal.anypoint.mulesoft.com/raml/api- designer –  (allows for mocking) •  Sublime Editor https://github.com/mulesoft/raml-sublime- plugin NOTE: Indentation matters in both •  Can have 1 to many files •  I have a very simple API. I kept mine in 1. Didn’t use includes, but did play with them •  No Security
  • 15. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Document Generation! •  RAML to HTML •  RAML to HTML - PHP
  • 16. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Thoughts on RAML Experience! •  Great documentation, samples and tutorial •  Good way to model your API –  When writing my server code, I did find I went back to my RAML model to remember what I was suppose to be doing. •  It is easy to understand and write, from the basic API perspective. –  When you get into Includes, Traits, it becomes a little more technical. •  Community tools –  Are easy to understand, install and work with. –  I played with: •  API Designer •  RAML Sublime Plugin •  RAML to HTML •  Swagger2raml •  Osprey / Osprey CLI
  • 17. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. SWAGGER! Swagger Community •  https://github.com/wordnik/swagger-spec Swagger Getting Started •  https://github.com/wordnik/swagger-spec/wiki
  • 18. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Three Ways To Create Swagger! 1.  Codegen: Traditional way of creating a Swagger Specification. The swagger codegen converts annotation in your code to Swagger Specification 2.  Automatically: swagger-node-express and swagger-play will create both your REST APIs and your Swagger Specification for you at the same time –  https://www.npmjs.org/package/swagger-node-express 3.  Manually: Write the json by hand.
  • 19. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Used swagger-node-express! •  Server.js – the node- express server •  Model.js - describes the resources (User, Wish) •  Resource.js – defines the actions for the resources Spec Action
  • 20. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Swagger Documentation! Composed of two files: •  Resource Listing: Lists the APIs that are available and gives a brief description of the them. •  API Description: Detailed description of each API in the Resource Listing.
  • 21. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Thoughts on SWAGGER Experience! •  Most widely used API DL to date •  On working with swagger-node-express: –  Once you get the hang of it, went smooth and very fun to see results. –  Key is to get your model.js (resource definitions) and your routes.js for your data access specified correctly. –  Definitely not top down. I ended up using my RAML spec to keep me on track. –  Con - you are really embedding swagger throughout your code. Code which may live forever, but will swagger? •  On Codegen creation of swagger: –  Easy self-explanatory –  Is still a bottom up approach. Even though you are stubbing out your code as you are modeling it, it is hard to share and express thoughts with out a lot of effort up front. •  Swagger-UI is very useful to help visualize and test your API •  If you have complex APIs, swagger probably won’t have the the constructs you need to fully express them. •  Writing swagger manually in JSON is not fun. It is not very human readable. A new Swagger Editor project was launched in May.
  • 22. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Where to do documentation?! Pros Cons Document in design and generate interface and docs from design •  Allows for changing docs without disturbing production code. •  Allows for NLS translation outside of production cycles •  If backend implementation changes but interface still the same, you are okay. Documentation can get out of sync with what is running in production. Document in code and generate docs from code •  Documentation is more likely to stay in sync with what is in production •  If issues with documentation, need to edit production code to regenerate Embed documentation in server code and have server dynamically serve up docs •  Documentation is more likely to stay in sync because it is embedded and running as part of the application •  You are now tied to that particular API DL implementation running your production code •  If there is user documentation errors, production changes are a must
  • 23. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. Thoughts On the API DL Focused on Today! •  All the API DL are starting to provide similar features and functions. They will continue to get closer and closer. •  Neither specifications that we focused on today can describe anything other then a RESTful API/Service. –  For SOAP based APIs WSDL is still king. An API Platform you choose should support SOAP based APIs via WSDL as well. •  Neither specification provides ability for extension, for example: describing testing and monitoring of the operations •  Neither specification handles National Language (NLS) of documentation •  System to System interactions – Today mostly focused on API creation and developer consumption. Next step is for system-to- system integrations
  • 24. Copyright © 2001-2013 SOA Software, Inc. All Rights Reserved. References! •  Another API-Blueprint, RAML, Swagger Comparison – Ole Lensmar •  Investigating API Developer Tooling - @DanMayer
  • 25. Copyright © 2001-2014 SOA Software, Inc. All Rights Reserved. Questions!