SlideShare a Scribd company logo
1 of 18
Download to read offline
Get Your Node.js API
Swaggering with OpenAPI Spec
Adam Paxton
Connect.tech Atlanta
September 21st, 2017
Presentation Notes
bit.ly/swaggernodejs
Overview
• What is the OpenAPI Spec?
• Why use it?
• Swagger Tools
• Design w/ Swagger Editor
• Build w/ Codegen
• Documentation 😲 with Swagger UI
• Demo with Node.js
Hello
• Adam Paxton
• Freelance Mobile App Developer

polancomedia.com
• Location API

condesa.io



Twitter: @adampax

Github: adampax
Goals
• We all try to practice RESTful API design
• And we all try to be consistent in our design and code
• And we all try to document our API (when we get time)
Problems
• Design can be cumbersome
• Especially w/ multiple people involved
• Giant Google Doc, anyone?
• Different opinions on implementation
• Documentation is last (if at all!)
Excuses
• It’s tough, Adam. I’m busy.
• I forgot how I did it on the last endpoint.
• It was the last dev’s fault!
The OpenAPI Specification
• Standard way to describe REST APIs
• Language agnostic
• Readable for devs and non devs
• And readable by our machine overlords
Swagger OpenAPI
• Formerly known as Swagger specification, owned by SmartBear
• 2015 - Open API Initiative (OAI) was formed
• Swagger donated to OAI, renamed OpenAPI Specification (OAS)
• Linux Foundation, Google, Microsoft, IBM, etc
• Swagger now refers to a framework of OAS developer tools
The OpenAPI Document
• How you ‘design’ your API
• Contained in one or more definition files
• Uses YAML or JSON
• Can be validated, tested, ported
OpenAPI doc in a Swagger Editor
Swagger Tools
• Offers both Open Source and Commercial Tools
• Swagger Editor - design your OpenAPI spec files
• Swagger UI - documentation site generator
• Swagger CodeGen - generate server stubs and client SDKs
• Swagger Inspector - inspection and validation tool
• Swagger Node - The module we’ll be using for the demo
swagger.io
Swagger Editor
github.com/swagger-api/swagger-editor
Swagger UI
• Documentation is already written!
• Generate an API doc site from your
OpenAPI Spec
• Several open source themes available
github.com/swagger-api/swagger-ui
Swagger Codegen
• Generate server stubs, client SDKs from your OpenAPI spec
• API clients: 

ActionScript, Apex, Bash, C#, C++, Clojure, Dart Elixir, Eiffel, 

Go, Groovy, Haskell, Java, Kotlin, Lua, Node.js, Objective-C, 

Perl, PHP, PowerShell, Python, R, Ruby, Rust, Scala, Swift, Typescript
• Server stubs:

C#, C++, Erlang, Go, Haskell, Java, PHP, Python, NodeJS, Ruby, Scala
• API documentation generators: HTML, Confluence Wiki
github.com/swagger-api/swagger-codegen
Swagger Inspector
swagger.io/swagger-inspector/
OpenAPI with Node.js
• swagger-node NPM module
• CLI for creating OpenAPI based Node.js projects
• boilerplate API and spec definition
• supports Express, Restify, Hapi, Sails, Connect
• Local copy of Swagger Editor
• Uses OpenAPI Spec v2.0 (v3 released in 2017)
github.com/swagger-api/swagger-node
swagger-node
//install 

$ [sudo] npm install -g swagger
//create a project with selected framework

$ swagger project create hello-world



? Framework? (Use arrow keys)

connect

› express

hapi

restify

sails
//launch for development

swagger project start
//launch the OpenAPI doc editor

swagger project edit
Demo!
Presentation Notes: bit.ly/swaggernodejs

More Related Content

What's hot

Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing ProcessQASource
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API TestingSauce Labs
 
Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Tony Tam
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with PythonTakuro Wada
 
API Test Automation
API Test Automation API Test Automation
API Test Automation SQALab
 
Mock Server Using WireMock
Mock Server Using WireMockMock Server Using WireMock
Mock Server Using WireMockGlobant
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David TzemachDavid Tzemach
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGSiddharth Sharma
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi SpecPedro J. Molina
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessibleVictor Trakhtenberg
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API TestingQASource
 
Jenkins vs GitLab CI
Jenkins vs GitLab CIJenkins vs GitLab CI
Jenkins vs GitLab CICEE-SEC(R)
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJSLuigi Saetta
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-AssuredMichel Schudel
 
What is an API Gateway?
What is an API Gateway?What is an API Gateway?
What is an API Gateway?LunchBadger
 

What's hot (20)

Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing Process
 
API Docs with OpenAPI 3.0
API Docs with OpenAPI 3.0API Docs with OpenAPI 3.0
API Docs with OpenAPI 3.0
 
An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
 
Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)Swagger APIs for Humans and Robots (Gluecon)
Swagger APIs for Humans and Robots (Gluecon)
 
OpenAPI development with Python
OpenAPI development with PythonOpenAPI development with Python
OpenAPI development with Python
 
API Test Automation
API Test Automation API Test Automation
API Test Automation
 
Postman
PostmanPostman
Postman
 
Swagger
SwaggerSwagger
Swagger
 
Mock Server Using WireMock
Mock Server Using WireMockMock Server Using WireMock
Mock Server Using WireMock
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David Tzemach
 
API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 
Building APIs with the OpenApi Spec
Building APIs with the OpenApi SpecBuilding APIs with the OpenApi Spec
Building APIs with the OpenApi Spec
 
Swagger - make your API accessible
Swagger - make your API accessibleSwagger - make your API accessible
Swagger - make your API accessible
 
Cucumber BDD
Cucumber BDDCucumber BDD
Cucumber BDD
 
4 Major Advantages of API Testing
4 Major Advantages of API Testing4 Major Advantages of API Testing
4 Major Advantages of API Testing
 
Jenkins vs GitLab CI
Jenkins vs GitLab CIJenkins vs GitLab CI
Jenkins vs GitLab CI
 
Rest API with Swagger and NodeJS
Rest API with Swagger and NodeJSRest API with Swagger and NodeJS
Rest API with Swagger and NodeJS
 
Test your microservices with REST-Assured
Test your microservices with REST-AssuredTest your microservices with REST-Assured
Test your microservices with REST-Assured
 
What is an API Gateway?
What is an API Gateway?What is an API Gateway?
What is an API Gateway?
 
API Design- Best Practices
API Design-   Best PracticesAPI Design-   Best Practices
API Design- Best Practices
 

Similar to Get Your Node.js API Swaggering with OpenAPI Spec

Always up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIAlways up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIGOG.com dev team
 
Swagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleepSwagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleepTobias Coetzee
 
Open API Specifications - formerly swagger
Open API Specifications - formerly swaggerOpen API Specifications - formerly swagger
Open API Specifications - formerly swaggerPradeep Kumar
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)Tom Johnson
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntAshley Roach
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierMiroslav Resetar
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at ScaleOracle Developers
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonSmartBear
 
Document your rest api using swagger - Devoxx 2015
Document your rest api using swagger - Devoxx 2015Document your rest api using swagger - Devoxx 2015
Document your rest api using swagger - Devoxx 2015johannes_fiala
 
A Tour of Swagger for APIs
A Tour of Swagger for APIsA Tour of Swagger for APIs
A Tour of Swagger for APIsAllen Dean
 
Swagger for startups
Swagger for startupsSwagger for startups
Swagger for startupsTony Tam
 
Design Driven API Development
Design Driven API DevelopmentDesign Driven API Development
Design Driven API DevelopmentSokichi Fujita
 
Beyond the basic Swagger UI: Adyen API Explorer
Beyond the basic Swagger UI: Adyen API ExplorerBeyond the basic Swagger UI: Adyen API Explorer
Beyond the basic Swagger UI: Adyen API ExplorerAleksei Akimov
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Tom Johnson
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SitePronovix
 
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...apidays
 
Go lambda-presentation
Go lambda-presentationGo lambda-presentation
Go lambda-presentationSteven White
 
Love your API with Swagger (Gluecon lightning talk)
Love your API with Swagger (Gluecon lightning talk)Love your API with Swagger (Gluecon lightning talk)
Love your API with Swagger (Gluecon lightning talk)Tony Tam
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadSoftware Guru
 

Similar to Get Your Node.js API Swaggering with OpenAPI Spec (20)

Always up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPIAlways up to date, testable and maintainable documentation with OpenAPI
Always up to date, testable and maintainable documentation with OpenAPI
 
Swagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleepSwagger: Restful documentation that won't put you to sleep
Swagger: Restful documentation that won't put you to sleep
 
Open API Specifications - formerly swagger
Open API Specifications - formerly swaggerOpen API Specifications - formerly swagger
Open API Specifications - formerly swagger
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
Building a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger HuntBuilding a REST API Microservice for the DevNet API Scavenger Hunt
Building a REST API Microservice for the DevNet API Scavenger Hunt
 
Swagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlierSwagger - Making REST APIs friendlier
Swagger - Making REST APIs friendlier
 
Delivering Developer Tools at Scale
Delivering Developer Tools at ScaleDelivering Developer Tools at Scale
Delivering Developer Tools at Scale
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & Python
 
Document your rest api using swagger - Devoxx 2015
Document your rest api using swagger - Devoxx 2015Document your rest api using swagger - Devoxx 2015
Document your rest api using swagger - Devoxx 2015
 
A Tour of Swagger for APIs
A Tour of Swagger for APIsA Tour of Swagger for APIs
A Tour of Swagger for APIs
 
Swagger for startups
Swagger for startupsSwagger for startups
Swagger for startups
 
Design Driven API Development
Design Driven API DevelopmentDesign Driven API Development
Design Driven API Development
 
API Conference 2021
API Conference 2021API Conference 2021
API Conference 2021
 
Beyond the basic Swagger UI: Adyen API Explorer
Beyond the basic Swagger UI: Adyen API ExplorerBeyond the basic Swagger UI: Adyen API Explorer
Beyond the basic Swagger UI: Adyen API Explorer
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Lessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc SiteLessons Learned from Revamping Our Doc Site
Lessons Learned from Revamping Our Doc Site
 
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by  Ilona Ko...
APIdays Paris 2019 - Lessons Learned from Revamping our Doc Site by Ilona Ko...
 
Go lambda-presentation
Go lambda-presentationGo lambda-presentation
Go lambda-presentation
 
Love your API with Swagger (Gluecon lightning talk)
Love your API with Swagger (Gluecon lightning talk)Love your API with Swagger (Gluecon lightning talk)
Love your API with Swagger (Gluecon lightning talk)
 
APIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidadAPIs distribuidos con alta escalabilidad
APIs distribuidos con alta escalabilidad
 

More from Adam Paxton

Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017Adam Paxton
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...Adam Paxton
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerAdam Paxton
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Adam Paxton
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumAdam Paxton
 
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Adam Paxton
 

More from Adam Paxton (6)

Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
Geolocation for Mobile Apps - Connect.tech Atlanta, 2017
 
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
The Big Easy: Native Mobile App Development with Appcelerator Titanium and Ja...
 
Continuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build ServerContinuous Cross Platform Mobile App Development using Jenkins Build Server
Continuous Cross Platform Mobile App Development using Jenkins Build Server
 
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
Intro to Appcelerator Titanium - Code for Fort Lauderdale 2015
 
Introduction to Appcelerator Titanium
Introduction to Appcelerator TitaniumIntroduction to Appcelerator Titanium
Introduction to Appcelerator Titanium
 
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
Build Custom Maps with Appcelerator Titanium, Mapbox and OpenStreetMap - tiCo...
 

Recently uploaded

在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查ydyuyu
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasDigicorns Technologies
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptxAsmae Rabhi
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxgalaxypingy
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsMonica Sydney
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 

Recently uploaded (20)

在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 
Best SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency DallasBest SEO Services Company in Dallas | Best SEO Agency Dallas
Best SEO Services Company in Dallas | Best SEO Agency Dallas
 
75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx75539-Cyber Security Challenges PPT.pptx
75539-Cyber Security Challenges PPT.pptx
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
PowerDirector Explination Process...pptx
PowerDirector Explination Process...pptxPowerDirector Explination Process...pptx
PowerDirector Explination Process...pptx
 
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi EscortsRussian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
Russian Escort Abu Dhabi 0503464457 Abu DHabi Escorts
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 

Get Your Node.js API Swaggering with OpenAPI Spec

  • 1. Get Your Node.js API Swaggering with OpenAPI Spec Adam Paxton Connect.tech Atlanta September 21st, 2017
  • 3. Overview • What is the OpenAPI Spec? • Why use it? • Swagger Tools • Design w/ Swagger Editor • Build w/ Codegen • Documentation 😲 with Swagger UI • Demo with Node.js
  • 4. Hello • Adam Paxton • Freelance Mobile App Developer
 polancomedia.com • Location API
 condesa.io
 
 Twitter: @adampax
 Github: adampax
  • 5. Goals • We all try to practice RESTful API design • And we all try to be consistent in our design and code • And we all try to document our API (when we get time)
  • 6. Problems • Design can be cumbersome • Especially w/ multiple people involved • Giant Google Doc, anyone? • Different opinions on implementation • Documentation is last (if at all!)
  • 7. Excuses • It’s tough, Adam. I’m busy. • I forgot how I did it on the last endpoint. • It was the last dev’s fault!
  • 8. The OpenAPI Specification • Standard way to describe REST APIs • Language agnostic • Readable for devs and non devs • And readable by our machine overlords
  • 9. Swagger OpenAPI • Formerly known as Swagger specification, owned by SmartBear • 2015 - Open API Initiative (OAI) was formed • Swagger donated to OAI, renamed OpenAPI Specification (OAS) • Linux Foundation, Google, Microsoft, IBM, etc • Swagger now refers to a framework of OAS developer tools
  • 10. The OpenAPI Document • How you ‘design’ your API • Contained in one or more definition files • Uses YAML or JSON • Can be validated, tested, ported OpenAPI doc in a Swagger Editor
  • 11. Swagger Tools • Offers both Open Source and Commercial Tools • Swagger Editor - design your OpenAPI spec files • Swagger UI - documentation site generator • Swagger CodeGen - generate server stubs and client SDKs • Swagger Inspector - inspection and validation tool • Swagger Node - The module we’ll be using for the demo swagger.io
  • 13. Swagger UI • Documentation is already written! • Generate an API doc site from your OpenAPI Spec • Several open source themes available github.com/swagger-api/swagger-ui
  • 14. Swagger Codegen • Generate server stubs, client SDKs from your OpenAPI spec • API clients: 
 ActionScript, Apex, Bash, C#, C++, Clojure, Dart Elixir, Eiffel, 
 Go, Groovy, Haskell, Java, Kotlin, Lua, Node.js, Objective-C, 
 Perl, PHP, PowerShell, Python, R, Ruby, Rust, Scala, Swift, Typescript • Server stubs:
 C#, C++, Erlang, Go, Haskell, Java, PHP, Python, NodeJS, Ruby, Scala • API documentation generators: HTML, Confluence Wiki github.com/swagger-api/swagger-codegen
  • 16. OpenAPI with Node.js • swagger-node NPM module • CLI for creating OpenAPI based Node.js projects • boilerplate API and spec definition • supports Express, Restify, Hapi, Sails, Connect • Local copy of Swagger Editor • Uses OpenAPI Spec v2.0 (v3 released in 2017) github.com/swagger-api/swagger-node
  • 17. swagger-node //install 
 $ [sudo] npm install -g swagger //create a project with selected framework
 $ swagger project create hello-world
 
 ? Framework? (Use arrow keys)
 connect
 › express
 hapi
 restify
 sails //launch for development
 swagger project start //launch the OpenAPI doc editor
 swagger project edit