SlideShare a Scribd company logo
1 of 35
Download to read offline
1
WORKSHOP
Design-First API Development Using Swagger & Node
Apigee Engineering
Agenda
2
1.
What is Design-First API
Development?
2. Installation
3. The famous hello-world
4. Project Conventions
5. Mock mode i.e response simulation
6. Query Parameters
7. Adding a new operation
8. How about POST?
©2015 Apigee. All Rights Reserved.
Some social media love
3©2015 Apigee. All Rights Reserved.
Some social media love
@apigee Awesome API development workshop #iloveapis #nodejs
4©2015 Apigee. All Rights Reserved.
APIs are for…
Developers
Apps :
● External
● Internal
Microservices
Devices
5©2015 Apigee. All Rights Reserved.
Design-First API
Development
6
Zen of API Development
The code defines the API
The API generates the code
The code is the API
API-driven code
7©2015 Apigee. All Rights Reserved.
API-driven code philosophy
8©2015 Apigee. All Rights Reserved.
The API must be designed first.
The artifact that represents the API design must drive the API runtime.
The API design will change, and the framework must make it possible to
adapt quickly without letting the code, design, and documentation fall out
of sync.
The "DRY" Principle
Swagger-Node
9
Swagger-Node
10©2015 Apigee. All Rights Reserved.
The API is written in Swagger, optionally using Swagger-Editor
The Swagger API document is parsed when server starts
Incoming calls are classified, validated, and routed in real time
Integrates with Connect, Express, Hapi, Restify, Sails...
Incorporates a plugin model for Swagger (or non-Swagger) extensions
Swagger-Node: Flow Diagram
11©2015 Apigee. All Rights Reserved.
But why Swagger ?
12©2015 Apigee. All Rights Reserved.
But why Node.js ?
13©2015 Apigee. All Rights Reserved.
Installation
14
Installation -1
1. Make sure you have node.js installed. v4.1.2 preferred.
https://nodejs.org/en/
$ node --version
15©2015 Apigee. All Rights Reserved.
Installation -2
Install
$ sudo npm install -g swagger
Verify:
$ swagger --version
0.7.4
DONE
16©2015 Apigee. All Rights Reserved.
What do you get?
• CLI
• project scaffolding
• project lifecycle
• Your own API Studio (sort of :-))
• Write YAML
• Immediate feedback loop
• Try-it on the fly
• Runtime
17©2015 Apigee. All Rights Reserved.
Let’s take a tour of API Studio
• Code Completion
• Immediate feedback loop
• Simulated Response aka “Mock Mode”
• Collaboration
• Download YAML/JSON & Node.js project
• Generated doc
• Raw Spec endpoint
18©2015 Apigee. All Rights Reserved.
Let’s create a project
$ swagger project create
19©2015 Apigee. All Rights Reserved.
Let’s run the project
$ cd $project-name
$ swagger project start
20©2015 Apigee. All Rights Reserved.
Let’s make some API call
$ curl http://127.0.0.1:10010/hello?name=Scott
21©2015 Apigee. All Rights Reserved.
Let’s not forget the tests
$ swagger project generate-test
$ swagger project test
22©2015 Apigee. All Rights Reserved.
How about editing ?
$ swagger project edit
23©2015 Apigee. All Rights Reserved.
Dissecting it
• Project Conventions
• swagger spec
• controllers
• helpers
24©2015 Apigee. All Rights Reserved.
Let’s add something new
• A new path that uses POST operation
25©2015 Apigee. All Rights Reserved.
..which requires
• A new controller
26©2015 Apigee. All Rights Reserved.
Try it out
curl -X POST http://127.0.0.1:10010/conf/add -H
"content-type:application/json" -d '{"x":5,"y":6}'
27©2015 Apigee. All Rights Reserved.
How about some API Management
• Let’s add quota
28©2015 Apigee. All Rights Reserved.
Quota : Get the bits
• Let’s add quota [This is subject to change. See latest at https://github.com/apigee-
127/volos-swagger-apply/blob/master/README.md]
npm install --save volos-swagger-apply
npm install --save volos-quota-memory
29©2015 Apigee. All Rights Reserved.
Quota : Annotate your Swagger
x-volos-resources:
MyQuota:
provider: volos-quota-memory
options:
timeUnit: minute
interval: 1
allow: 1
x-volos-apply:
MyQuota: {}
30©2015 Apigee. All Rights Reserved.
Quota : Tell the framework about it.
Add fitting to config/default.yaml to swagger_controllers :
- volos-swagger-apply
31©2015 Apigee. All Rights Reserved.
Quota : Verify that it works
curl -X POST http://127.0.0.1:10010/conf/add -H "content-type:
application/json" -d '{"x":5,"y":6}'
{"message":"exceeded quota","status":403}
32©2015 Apigee. All Rights Reserved.
Deploy to Apigee
sudo npm install -g apigeetool
apigeetool deploynodeapp -u sdoe@apigee.com -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2
OR
a127 project deploy
33©2015 Apigee. All Rights Reserved.
Source: https://github.com/prabhatjha/iloveapi2015
Community: https://community.apigee.com
Github:
github.com/apigee
github.com/apigee-127
Where can I get help?
34©2015 Apigee. All Rights Reserved.
Thank You
35

More Related Content

What's hot

I Love APIs 2015: End to End Testing: Bug Squashing for Developers
I Love APIs 2015: End to End Testing: Bug Squashing for DevelopersI Love APIs 2015: End to End Testing: Bug Squashing for Developers
I Love APIs 2015: End to End Testing: Bug Squashing for DevelopersApigee | Google Cloud
 
Deep Dive: Strategic Importance of BaaS
Deep Dive: Strategic Importance of BaaSDeep Dive: Strategic Importance of BaaS
Deep Dive: Strategic Importance of BaaSApigee | Google Cloud
 
I Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
I Love APIs 2015: The "State" of your API: Common Use Cases for Storing DataI Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
I Love APIs 2015: The "State" of your API: Common Use Cases for Storing DataApigee | Google Cloud
 
How to Grow and Measure Your API Program - I ♥ APIs 2015
How to Grow and Measure Your API Program - I ♥ APIs 2015How to Grow and Measure Your API Program - I ♥ APIs 2015
How to Grow and Measure Your API Program - I ♥ APIs 2015Andrew Mager
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop Apigee | Google Cloud
 
IT agility is no longer an oxymoron
IT agility is no longer an oxymoron IT agility is no longer an oxymoron
IT agility is no longer an oxymoron Apigee | Google Cloud
 
Orchestrating microservices like a ninja
Orchestrating microservices like a ninjaOrchestrating microservices like a ninja
Orchestrating microservices like a ninjaApigee | Google Cloud
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopI Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopApigee | Google Cloud
 
Transforming Your Business Through APIs
Transforming Your Business Through APIsTransforming Your Business Through APIs
Transforming Your Business Through APIsApigee | Google Cloud
 
Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge Apigee | Google Cloud
 
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWS
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWSAdvanced Security Extensions in Apigee Edge: JWT, JWE, JWS
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWSApigee | Google Cloud
 
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays
 
rockwell software studio 5000-lva1-app6892
rockwell software studio 5000-lva1-app6892rockwell software studio 5000-lva1-app6892
rockwell software studio 5000-lva1-app6892Shashi Ranjan Singh
 
ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)
ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)
ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)hobbs
 
Webcast: Pragmatic REST: The Next Generation
Webcast: Pragmatic REST: The Next GenerationWebcast: Pragmatic REST: The Next Generation
Webcast: Pragmatic REST: The Next GenerationApigee | Google Cloud
 
The Internet of Things and Developers: What the Enterprise Needs to Know
The Internet of Things and Developers: What the Enterprise Needs to KnowThe Internet of Things and Developers: What the Enterprise Needs to Know
The Internet of Things and Developers: What the Enterprise Needs to KnowApigee | Google Cloud
 
YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.
YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.
YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.Diogo Lucas
 
Unlocking Value From the Internet of Things (IoT) with APIs
Unlocking Value From the Internet of Things (IoT) with APIsUnlocking Value From the Internet of Things (IoT) with APIs
Unlocking Value From the Internet of Things (IoT) with APIsApigee | Google Cloud
 
apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...
apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...
apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...apidays
 
API as a Growth Tool
API as a Growth ToolAPI as a Growth Tool
API as a Growth Tool3scale
 

What's hot (20)

I Love APIs 2015: End to End Testing: Bug Squashing for Developers
I Love APIs 2015: End to End Testing: Bug Squashing for DevelopersI Love APIs 2015: End to End Testing: Bug Squashing for Developers
I Love APIs 2015: End to End Testing: Bug Squashing for Developers
 
Deep Dive: Strategic Importance of BaaS
Deep Dive: Strategic Importance of BaaSDeep Dive: Strategic Importance of BaaS
Deep Dive: Strategic Importance of BaaS
 
I Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
I Love APIs 2015: The "State" of your API: Common Use Cases for Storing DataI Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
I Love APIs 2015: The "State" of your API: Common Use Cases for Storing Data
 
How to Grow and Measure Your API Program - I ♥ APIs 2015
How to Grow and Measure Your API Program - I ♥ APIs 2015How to Grow and Measure Your API Program - I ♥ APIs 2015
How to Grow and Measure Your API Program - I ♥ APIs 2015
 
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
I Love APIs 2015: Advanced Crash Course in Apigee Edge Workshop
 
IT agility is no longer an oxymoron
IT agility is no longer an oxymoron IT agility is no longer an oxymoron
IT agility is no longer an oxymoron
 
Orchestrating microservices like a ninja
Orchestrating microservices like a ninjaOrchestrating microservices like a ninja
Orchestrating microservices like a ninja
 
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge WorkshopI Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
I Love APIs 2015: Crash Course Foundational Topics in Apigee Edge Workshop
 
Transforming Your Business Through APIs
Transforming Your Business Through APIsTransforming Your Business Through APIs
Transforming Your Business Through APIs
 
Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge Node.js - Extending the Programmability of Apigee Edge
Node.js - Extending the Programmability of Apigee Edge
 
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWS
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWSAdvanced Security Extensions in Apigee Edge: JWT, JWE, JWS
Advanced Security Extensions in Apigee Edge: JWT, JWE, JWS
 
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
apidays LIVE New York - Navigating the Sea of Javascript Tools to Discover Sc...
 
rockwell software studio 5000-lva1-app6892
rockwell software studio 5000-lva1-app6892rockwell software studio 5000-lva1-app6892
rockwell software studio 5000-lva1-app6892
 
ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)
ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)
ActiveState Stackato and Lessons Learned with Cloud Foundry (CF Summit 2014)
 
Webcast: Pragmatic REST: The Next Generation
Webcast: Pragmatic REST: The Next GenerationWebcast: Pragmatic REST: The Next Generation
Webcast: Pragmatic REST: The Next Generation
 
The Internet of Things and Developers: What the Enterprise Needs to Know
The Internet of Things and Developers: What the Enterprise Needs to KnowThe Internet of Things and Developers: What the Enterprise Needs to Know
The Internet of Things and Developers: What the Enterprise Needs to Know
 
YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.
YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.
YAGNI, YMMV and APIs: building a hybrid strategy for your API platform.
 
Unlocking Value From the Internet of Things (IoT) with APIs
Unlocking Value From the Internet of Things (IoT) with APIsUnlocking Value From the Internet of Things (IoT) with APIs
Unlocking Value From the Internet of Things (IoT) with APIs
 
apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...
apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...
apidays LIVE New York 2021 - API tool chain for low budget programs by Paul K...
 
API as a Growth Tool
API as a Growth ToolAPI as a Growth Tool
API as a Growth Tool
 

Viewers also liked

Design Driven API Development
Design Driven API DevelopmentDesign Driven API Development
Design Driven API DevelopmentSokichi Fujita
 
Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...
Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...
Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...CA Technologies
 
Case Study: Rogers Communications Integrates CA API Management and CA Service...
Case Study: Rogers Communications Integrates CA API Management and CA Service...Case Study: Rogers Communications Integrates CA API Management and CA Service...
Case Study: Rogers Communications Integrates CA API Management and CA Service...CA Technologies
 
Birds Eye View on API Development - v1.0
Birds Eye View on API Development - v1.0Birds Eye View on API Development - v1.0
Birds Eye View on API Development - v1.0API Talent
 
20 propuestas individuales para el 15 m
20 propuestas individuales para el 15 m20 propuestas individuales para el 15 m
20 propuestas individuales para el 15 mIrma Acosta
 
INVESTIGANDO NUESTRA MENTE
INVESTIGANDO NUESTRA MENTEINVESTIGANDO NUESTRA MENTE
INVESTIGANDO NUESTRA MENTEMagda BerRub
 
CA API Management: A DevOps Enabler
CA API Management: A DevOps EnablerCA API Management: A DevOps Enabler
CA API Management: A DevOps EnablerRajat Vijayvargiya
 
Building APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerBuilding APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerJeremy Whitlock
 
Battelfield REST, API Development from the trenches
Battelfield REST, API Development from the trenchesBattelfield REST, API Development from the trenches
Battelfield REST, API Development from the trenchesDaniel Cerecedo
 
Design API using RAML - basics
Design API using RAML - basicsDesign API using RAML - basics
Design API using RAML - basicskunal vishe
 
API World 2016 - A five-sided prism polarizing Web API development
API World 2016 - A five-sided prism polarizing Web API developmentAPI World 2016 - A five-sided prism polarizing Web API development
API World 2016 - A five-sided prism polarizing Web API developmentRestlet
 
Health care financing in India
Health care financing in IndiaHealth care financing in India
Health care financing in IndiaSubraham Pany
 
Another API-Blueprint, RAML and Swagger Comparison
Another API-Blueprint, RAML and Swagger ComparisonAnother API-Blueprint, RAML and Swagger Comparison
Another API-Blueprint, RAML and Swagger ComparisonSmartBear
 
A Tour of Swagger for APIs
A Tour of Swagger for APIsA Tour of Swagger for APIs
A Tour of Swagger for APIsAllen Dean
 

Viewers also liked (19)

Managing api development
Managing api developmentManaging api development
Managing api development
 
Design Driven API Development
Design Driven API DevelopmentDesign Driven API Development
Design Driven API Development
 
Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...
Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...
Pitney Bowes Uses Development and Testing Tools to Drive Early API Developmen...
 
Case Study: Rogers Communications Integrates CA API Management and CA Service...
Case Study: Rogers Communications Integrates CA API Management and CA Service...Case Study: Rogers Communications Integrates CA API Management and CA Service...
Case Study: Rogers Communications Integrates CA API Management and CA Service...
 
Birds Eye View on API Development - v1.0
Birds Eye View on API Development - v1.0Birds Eye View on API Development - v1.0
Birds Eye View on API Development - v1.0
 
20 propuestas individuales para el 15 m
20 propuestas individuales para el 15 m20 propuestas individuales para el 15 m
20 propuestas individuales para el 15 m
 
INVESTIGANDO NUESTRA MENTE
INVESTIGANDO NUESTRA MENTEINVESTIGANDO NUESTRA MENTE
INVESTIGANDO NUESTRA MENTE
 
Pmi Innovative vs
Pmi Innovative vsPmi Innovative vs
Pmi Innovative vs
 
Play in Peace Letter
Play in Peace LetterPlay in Peace Letter
Play in Peace Letter
 
CA API Management: A DevOps Enabler
CA API Management: A DevOps EnablerCA API Management: A DevOps Enabler
CA API Management: A DevOps Enabler
 
Building APIs with Node.js and Swagger
Building APIs with Node.js and SwaggerBuilding APIs with Node.js and Swagger
Building APIs with Node.js and Swagger
 
Battelfield REST, API Development from the trenches
Battelfield REST, API Development from the trenchesBattelfield REST, API Development from the trenches
Battelfield REST, API Development from the trenches
 
Raml api designer
Raml   api designerRaml   api designer
Raml api designer
 
Brenda y Amanda
Brenda y AmandaBrenda y Amanda
Brenda y Amanda
 
Design API using RAML - basics
Design API using RAML - basicsDesign API using RAML - basics
Design API using RAML - basics
 
API World 2016 - A five-sided prism polarizing Web API development
API World 2016 - A five-sided prism polarizing Web API developmentAPI World 2016 - A five-sided prism polarizing Web API development
API World 2016 - A five-sided prism polarizing Web API development
 
Health care financing in India
Health care financing in IndiaHealth care financing in India
Health care financing in India
 
Another API-Blueprint, RAML and Swagger Comparison
Another API-Blueprint, RAML and Swagger ComparisonAnother API-Blueprint, RAML and Swagger Comparison
Another API-Blueprint, RAML and Swagger Comparison
 
A Tour of Swagger for APIs
A Tour of Swagger for APIsA Tour of Swagger for APIs
A Tour of Swagger for APIs
 

Similar to I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger

Bringing API Management to AWS Powered Backends
Bringing API Management to AWS Powered BackendsBringing API Management to AWS Powered Backends
Bringing API Management to AWS Powered BackendsApigee | Google Cloud
 
Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices developmentChavdar Baikov
 
IoTCraft - Chennai - meetup - ZettaJS - IoT Intro
IoTCraft  - Chennai - meetup - ZettaJS - IoT IntroIoTCraft  - Chennai - meetup - ZettaJS - IoT Intro
IoTCraft - Chennai - meetup - ZettaJS - IoT IntroAnil Sagar
 
apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...
apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...
apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...apidays
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015Mike McNeil
 
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...apidays
 
Pivotal + Apigee Workshop (June 4th, 2019)
Pivotal + Apigee Workshop (June 4th, 2019)Pivotal + Apigee Workshop (June 4th, 2019)
Pivotal + Apigee Workshop (June 4th, 2019)Alexandre Roman
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersCisco DevNet
 
Build APIs in Node.js and Swagger 2.0 with Apigee-127
Build APIs in Node.js and Swagger 2.0 with Apigee-127Build APIs in Node.js and Swagger 2.0 with Apigee-127
Build APIs in Node.js and Swagger 2.0 with Apigee-127Apigee | Google Cloud
 
the 12 facets of OpenAPI
the 12 facets of OpenAPIthe 12 facets of OpenAPI
the 12 facets of OpenAPICisco DevNet
 
Auckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led designAuckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led designDamian Harvey
 
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
 
Building the Pipeline of My Dreams
Building the Pipeline of My DreamsBuilding the Pipeline of My Dreams
Building the Pipeline of My DreamsGene Gotimer
 
AppSphere 15 - PHP, Node.js and Python Deep Dive
AppSphere 15 - PHP, Node.js and Python Deep DiveAppSphere 15 - PHP, Node.js and Python Deep Dive
AppSphere 15 - PHP, Node.js and Python Deep DiveAppDynamics
 
Bringing Partners, Teams & Systems Together through APIs
Bringing Partners, Teams & Systems Together through APIsBringing Partners, Teams & Systems Together through APIs
Bringing Partners, Teams & Systems Together through APIsApigee | Google Cloud
 
Webcast: Deep-Dive Apigee Edge Microgateway
Webcast: Deep-Dive Apigee Edge MicrogatewayWebcast: Deep-Dive Apigee Edge Microgateway
Webcast: Deep-Dive Apigee Edge MicrogatewayApigee | Google Cloud
 
API-first, going beyond SOA, ESB & Integration
API-first, going beyond SOA, ESB & IntegrationAPI-first, going beyond SOA, ESB & Integration
API-first, going beyond SOA, ESB & IntegrationApigee | Google Cloud
 
Api-First service design
Api-First service designApi-First service design
Api-First service designStefaan Ponnet
 
Well Crafted API Models – Key to Streamlining Workflows
Well Crafted API Models – Key to Streamlining WorkflowsWell Crafted API Models – Key to Streamlining Workflows
Well Crafted API Models – Key to Streamlining WorkflowsAxway
 

Similar to I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger (20)

Bringing API Management to AWS Powered Backends
Bringing API Management to AWS Powered BackendsBringing API Management to AWS Powered Backends
Bringing API Management to AWS Powered Backends
 
Practical Application of API-First in microservices development
Practical Application of API-First in microservices developmentPractical Application of API-First in microservices development
Practical Application of API-First in microservices development
 
IoTCraft - Chennai - meetup - ZettaJS - IoT Intro
IoTCraft  - Chennai - meetup - ZettaJS - IoT IntroIoTCraft  - Chennai - meetup - ZettaJS - IoT Intro
IoTCraft - Chennai - meetup - ZettaJS - IoT Intro
 
apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...
apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...
apidays LIVE Paris 2021 - APIGEE, different ways for integrating with CI/CD p...
 
I Love APIs - Oct 2015
I Love APIs - Oct 2015I Love APIs - Oct 2015
I Love APIs - Oct 2015
 
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
apidays Paris 2022 - The 12 Facets of the OpenAPI Specification, Steve Sfartz...
 
Pivotal + Apigee Workshop (June 4th, 2019)
Pivotal + Apigee Workshop (June 4th, 2019)Pivotal + Apigee Workshop (June 4th, 2019)
Pivotal + Apigee Workshop (June 4th, 2019)
 
How to design effective APIs
How to design effective APIsHow to design effective APIs
How to design effective APIs
 
Emulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API ProvidersEmulators as an Emerging Best Practice for API Providers
Emulators as an Emerging Best Practice for API Providers
 
Build APIs in Node.js and Swagger 2.0 with Apigee-127
Build APIs in Node.js and Swagger 2.0 with Apigee-127Build APIs in Node.js and Swagger 2.0 with Apigee-127
Build APIs in Node.js and Swagger 2.0 with Apigee-127
 
the 12 facets of OpenAPI
the 12 facets of OpenAPIthe 12 facets of OpenAPI
the 12 facets of OpenAPI
 
Auckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led designAuckland API & Microservices Meetup 1: API led design
Auckland API & Microservices Meetup 1: API led design
 
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
 
Building the Pipeline of My Dreams
Building the Pipeline of My DreamsBuilding the Pipeline of My Dreams
Building the Pipeline of My Dreams
 
AppSphere 15 - PHP, Node.js and Python Deep Dive
AppSphere 15 - PHP, Node.js and Python Deep DiveAppSphere 15 - PHP, Node.js and Python Deep Dive
AppSphere 15 - PHP, Node.js and Python Deep Dive
 
Bringing Partners, Teams & Systems Together through APIs
Bringing Partners, Teams & Systems Together through APIsBringing Partners, Teams & Systems Together through APIs
Bringing Partners, Teams & Systems Together through APIs
 
Webcast: Deep-Dive Apigee Edge Microgateway
Webcast: Deep-Dive Apigee Edge MicrogatewayWebcast: Deep-Dive Apigee Edge Microgateway
Webcast: Deep-Dive Apigee Edge Microgateway
 
API-first, going beyond SOA, ESB & Integration
API-first, going beyond SOA, ESB & IntegrationAPI-first, going beyond SOA, ESB & Integration
API-first, going beyond SOA, ESB & Integration
 
Api-First service design
Api-First service designApi-First service design
Api-First service design
 
Well Crafted API Models – Key to Streamlining Workflows
Well Crafted API Models – Key to Streamlining WorkflowsWell Crafted API Models – Key to Streamlining Workflows
Well Crafted API Models – Key to Streamlining Workflows
 

More from Apigee | Google Cloud

Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Apigee | Google Cloud
 
AccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldAccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldApigee | Google Cloud
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Apigee | Google Cloud
 
The Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketThe Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketApigee | Google Cloud
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsApigee | Google Cloud
 
Microservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessMicroservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessApigee | Google Cloud
 
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorAdapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorApigee | Google Cloud
 
Adapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailAdapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailApigee | Google Cloud
 
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranAdapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranApigee | Google Cloud
 
London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!Apigee | Google Cloud
 

More from Apigee | Google Cloud (20)

How Secure Are Your APIs?
How Secure Are Your APIs?How Secure Are Your APIs?
How Secure Are Your APIs?
 
Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)Magazine Luiza at a glance (1)
Magazine Luiza at a glance (1)
 
Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs Monetization: Unlock More Value from Your APIs
Monetization: Unlock More Value from Your APIs
 
Apigee Demo: API Platform Overview
Apigee Demo: API Platform OverviewApigee Demo: API Platform Overview
Apigee Demo: API Platform Overview
 
Ticketmaster at a glance
Ticketmaster at a glanceTicketmaster at a glance
Ticketmaster at a glance
 
AccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First WorldAccuWeather: Recasting API Experiences in a Developer-First World
AccuWeather: Recasting API Experiences in a Developer-First World
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2Apigee Product Roadmap Part 2
Apigee Product Roadmap Part 2
 
The Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management MarketThe Four Transformative Forces of the API Management Market
The Four Transformative Forces of the API Management Market
 
Walgreens at a glance
Walgreens at a glanceWalgreens at a glance
Walgreens at a glance
 
Apigee Edge: Intro to Microgateway
Apigee Edge: Intro to MicrogatewayApigee Edge: Intro to Microgateway
Apigee Edge: Intro to Microgateway
 
Managing the Complexity of Microservices Deployments
Managing the Complexity of Microservices DeploymentsManaging the Complexity of Microservices Deployments
Managing the Complexity of Microservices Deployments
 
Pitney Bowes at a glance
Pitney Bowes at a glancePitney Bowes at a glance
Pitney Bowes at a glance
 
Microservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices SuccessMicroservices Done Right: Key Ingredients for Microservices Success
Microservices Done Right: Key Ingredients for Microservices Success
 
Adapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet KapoorAdapt or Die: Opening Keynote with Chet Kapoor
Adapt or Die: Opening Keynote with Chet Kapoor
 
Adapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg BrailAdapt or Die: Keynote with Greg Brail
Adapt or Die: Keynote with Greg Brail
 
Adapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant JhingranAdapt or Die: Keynote with Anant Jhingran
Adapt or Die: Keynote with Anant Jhingran
 
London Adapt or Die: Opening Keynot
London Adapt or Die: Opening KeynotLondon Adapt or Die: Opening Keynot
London Adapt or Die: Opening Keynot
 
London Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynoteLondon Adapt or Die: Lunch keynote
London Adapt or Die: Lunch keynote
 
London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!London Adapt or Die: Closing Keynote — Adapt Now!
London Adapt or Die: Closing Keynote — Adapt Now!
 

Recently uploaded

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...masabamasaba
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisamasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 

Recently uploaded (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 

I Love APIs 2015 API Lab Design-first API Development Using Node and Swagger

  • 1. 1 WORKSHOP Design-First API Development Using Swagger & Node Apigee Engineering
  • 2. Agenda 2 1. What is Design-First API Development? 2. Installation 3. The famous hello-world 4. Project Conventions 5. Mock mode i.e response simulation 6. Query Parameters 7. Adding a new operation 8. How about POST? ©2015 Apigee. All Rights Reserved.
  • 3. Some social media love 3©2015 Apigee. All Rights Reserved.
  • 4. Some social media love @apigee Awesome API development workshop #iloveapis #nodejs 4©2015 Apigee. All Rights Reserved.
  • 5. APIs are for… Developers Apps : ● External ● Internal Microservices Devices 5©2015 Apigee. All Rights Reserved.
  • 7. Zen of API Development The code defines the API The API generates the code The code is the API API-driven code 7©2015 Apigee. All Rights Reserved.
  • 8. API-driven code philosophy 8©2015 Apigee. All Rights Reserved. The API must be designed first. The artifact that represents the API design must drive the API runtime. The API design will change, and the framework must make it possible to adapt quickly without letting the code, design, and documentation fall out of sync. The "DRY" Principle
  • 10. Swagger-Node 10©2015 Apigee. All Rights Reserved. The API is written in Swagger, optionally using Swagger-Editor The Swagger API document is parsed when server starts Incoming calls are classified, validated, and routed in real time Integrates with Connect, Express, Hapi, Restify, Sails... Incorporates a plugin model for Swagger (or non-Swagger) extensions
  • 11. Swagger-Node: Flow Diagram 11©2015 Apigee. All Rights Reserved.
  • 12. But why Swagger ? 12©2015 Apigee. All Rights Reserved.
  • 13. But why Node.js ? 13©2015 Apigee. All Rights Reserved.
  • 15. Installation -1 1. Make sure you have node.js installed. v4.1.2 preferred. https://nodejs.org/en/ $ node --version 15©2015 Apigee. All Rights Reserved.
  • 16. Installation -2 Install $ sudo npm install -g swagger Verify: $ swagger --version 0.7.4 DONE 16©2015 Apigee. All Rights Reserved.
  • 17. What do you get? • CLI • project scaffolding • project lifecycle • Your own API Studio (sort of :-)) • Write YAML • Immediate feedback loop • Try-it on the fly • Runtime 17©2015 Apigee. All Rights Reserved.
  • 18. Let’s take a tour of API Studio • Code Completion • Immediate feedback loop • Simulated Response aka “Mock Mode” • Collaboration • Download YAML/JSON & Node.js project • Generated doc • Raw Spec endpoint 18©2015 Apigee. All Rights Reserved.
  • 19. Let’s create a project $ swagger project create 19©2015 Apigee. All Rights Reserved.
  • 20. Let’s run the project $ cd $project-name $ swagger project start 20©2015 Apigee. All Rights Reserved.
  • 21. Let’s make some API call $ curl http://127.0.0.1:10010/hello?name=Scott 21©2015 Apigee. All Rights Reserved.
  • 22. Let’s not forget the tests $ swagger project generate-test $ swagger project test 22©2015 Apigee. All Rights Reserved.
  • 23. How about editing ? $ swagger project edit 23©2015 Apigee. All Rights Reserved.
  • 24. Dissecting it • Project Conventions • swagger spec • controllers • helpers 24©2015 Apigee. All Rights Reserved.
  • 25. Let’s add something new • A new path that uses POST operation 25©2015 Apigee. All Rights Reserved.
  • 26. ..which requires • A new controller 26©2015 Apigee. All Rights Reserved.
  • 27. Try it out curl -X POST http://127.0.0.1:10010/conf/add -H "content-type:application/json" -d '{"x":5,"y":6}' 27©2015 Apigee. All Rights Reserved.
  • 28. How about some API Management • Let’s add quota 28©2015 Apigee. All Rights Reserved.
  • 29. Quota : Get the bits • Let’s add quota [This is subject to change. See latest at https://github.com/apigee- 127/volos-swagger-apply/blob/master/README.md] npm install --save volos-swagger-apply npm install --save volos-quota-memory 29©2015 Apigee. All Rights Reserved.
  • 30. Quota : Annotate your Swagger x-volos-resources: MyQuota: provider: volos-quota-memory options: timeUnit: minute interval: 1 allow: 1 x-volos-apply: MyQuota: {} 30©2015 Apigee. All Rights Reserved.
  • 31. Quota : Tell the framework about it. Add fitting to config/default.yaml to swagger_controllers : - volos-swagger-apply 31©2015 Apigee. All Rights Reserved.
  • 32. Quota : Verify that it works curl -X POST http://127.0.0.1:10010/conf/add -H "content-type: application/json" -d '{"x":5,"y":6}' {"message":"exceeded quota","status":403} 32©2015 Apigee. All Rights Reserved.
  • 33. Deploy to Apigee sudo npm install -g apigeetool apigeetool deploynodeapp -u sdoe@apigee.com -o sdoe -e test -n 'Test Node App 2' -d . -m app.js -b /node2 OR a127 project deploy 33©2015 Apigee. All Rights Reserved.