SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
Deploy and Access WebSphere Liberty and
StrongLoop REST Endpoints on IBM Bluemix
Arthur De Magalhaes
Presenter
Arthur De Magalhaes
WebSphere Liberty REST API architect
arthurdm@ca.ibm.com
Agenda
2
• The API Economy
• What is Swagger
• StrongLoop
• Liberty API Discovery
• Demonstration
• Feedback
API Economy
API Economy
• APIs connect services in the Internet-of-things (IoT).
• Businesses provide and consume assets through APIs.
• REST APIs are client and server neutral, so often used as the bridge in
IoT.
• The number of available REST APIs increases daily, but without a
standard way of defining, exposing or discovering them.
4
What is Swagger
Swagger Introduction
• Industry leading specification for defining REST APIs.
• Supports with both JSON and YAML formats.
• Large open source community with various projects on GitHub:
• Client code generation (26 languages).
• Server code generation (9 languages).
• Online editor and GUI.
• Over 2000 related open-source repository, with 15000 daily downloads.
• Base specification for Open API Initiative (https://openapis.org/), under
Linux foundation.
6
Swagger YAML Sample
7
paths:
/pet:
post:
tags:
- pet
summary: Add a new pet to the store
description: ''
operationId: addPet
consumes:
- application/json
- application/xml
produces:
- application/xml
- application/json
parameters:
- in: body
name: body
description: Pet object that needs to be added to the store
required: true
schema:
$ref: '#/definitions/Pet'
responses:
'405':
description: Invalid input
security:
- petstore_auth:
- 'write:pets'
- 'read:pets'
StrongLoop
StrongLoop (an IBM Company)
• Leader in enterprise Node.js.
• Over 130 npm modules.
• Major contributor to Open Source LoopBack and Express.
• Design REST APIs from data models.
• Top-down from design or from Swagger doc.
• Auto-generates Swagger 2.0
• Core member of Node.js Foundation.
• Available as part of API Connect’s “Create” license
9
StrongLoop Arc
10
Composer
11
• Can create models from
DBs or from scratch.
• Provides a very nice
“top-down” experience.
Exploring your API
12
• <app>/explorer
• Based on OS Swagger UI
• Can test APIs
• By default, Swagger available at:
<app>/explorer/swagger.json
StrongLoop in Bluemix
• You can deploy existing StrongLoop applications into Bluemix using
Cloud Foundry’s commands:
– cd <app-dir>
– cf api https://api.ng.bluemix.net
– cf login -u <bluemix-userid> -o <bluemix-userid> -s dev
– cf push <app-name>
• UI: http://<bluemix-host>/explorer
• Swagger doc: http://<bluemix-host>/explorer/swagger.json
13
StrongLoop Boilerplates
14
• Alternatively, there are 2 boilerplate packages to help you get started.
StrongLoop Boilerplates
15
Liberty API Discovery
API Economy with Liberty
• What are the challenges when using Swagger with Java EE?
– Merging Swagger from annotations and standalone docs
– UI for rapid API development and unit testing
– Exploring all available APIs
– Generating code to call external services
• Liberty can help with all of these things!
17
API Discovery
• All applications are discoverable in a single RESTful endpoint,
/ibm/api/docs
• Query parameter allows filtering based on context root.
• Support both JSON and YAML.
• Application participation can be configured in server.xml (location, on/off).
• Available through apiDiscovery-1.0 feature.
18
Applications
Liberty
REST
Admin UI
API Connect
API Discovery User Interface
• Based on the Open Source Swagger UI.
• Available at /ibm/api/explorer.
19
API Discovery Collective Support
• Enabling apiDiscovery-1.0 on a collective member will expose their
aggregated Swagger documentation available.
• Endpoints:
– /ibm/api/collective/docs
– /ibm/api/collective/explorer
20
Admin UI
Repository
membersREST
controller
API Connect
API Discovery Subscription
• POST ibm/api/docs/subscription
• Request:
{ docType: string}
• Returns:
{ feedURL : wss://ibm/api/docs/subscription/websocket/{id}, feedType: websocket }
• The client opens WSS connection and receives updates in real-time
• Equivalent collective support at /ibm/api/collective/docs/subscription
• Works with either webSocket-1.0 or webSocket-1.1
21
API Discovery in Bluemix
• Push a Liberty package into Bluemix
• cf push <yourappname> -p defaultServer
• Creates an auto-discoverable container in the cloud.
22
Admin UI
app
app
app
WLP
API Connect
C
M
M
Pulling Liberty Assets from API Connect
23
API Connect
Hybrid Liberty + StrongLoop Collective
swagger.json
Pushing Standalone Assets into API Connect
Continuous Integration
product.json
Source Repository
Swagger
processor
API Connect
CLI
PUBLIC | DEDICATED | LOCAL
API Connectproduct.json +
swagger.json
Developer
Pushing Liberty Assets into API Connect
Hybrid Liberty + StrongLoop Collective
PUBLIC | DEDICATED | LOCAL
API Connect
Administrator
product.json
product.json
C
M
M
or
product.json +
swagger.json
Developer
Continuous Integration
deploy
1
2
WebSphere Developer Tools Support
• Authoring Swagger document (main doc or stub) through templates
and skeleton
• Includes JSON and Swagger-based validation.
• Auto-generate JAXRS 2.0 client from Swagger document or URL
• Can point to a running Liberty instance or Collective Controller and generate a
JAXRS client that can connect to any of the exposed services!
26
Demonstration

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Manage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API GatewayManage your APIs and Microservices with an API Gateway
Manage your APIs and Microservices with an API Gateway
 
Customizing Apache CloudStack - CCC13
Customizing Apache CloudStack - CCC13Customizing Apache CloudStack - CCC13
Customizing Apache CloudStack - CCC13
 
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
Scylla Summit 2018: Kong & Cassandra/Scylla for distributed APIs and Microser...
 
Develop - Race to the Finish! Accelerate Your Skills
Develop - Race to the Finish! Accelerate Your SkillsDevelop - Race to the Finish! Accelerate Your Skills
Develop - Race to the Finish! Accelerate Your Skills
 
Web application I have always dreamt of
Web application I have always dreamt ofWeb application I have always dreamt of
Web application I have always dreamt of
 
Continuous Deployment with Containers
Continuous Deployment with ContainersContinuous Deployment with Containers
Continuous Deployment with Containers
 
Cloud Native APIs: The API Operator for Kubernetes
Cloud Native APIs: The API Operator for KubernetesCloud Native APIs: The API Operator for Kubernetes
Cloud Native APIs: The API Operator for Kubernetes
 
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
Power of Microsoft Graph API by Nilesh Shah SharePoint Saturday Toronto 2017
 
M.Montalbano/M.Colombo Speroni/S.Sala - Combining React and Websocket to buil...
M.Montalbano/M.Colombo Speroni/S.Sala - Combining React and Websocket to buil...M.Montalbano/M.Colombo Speroni/S.Sala - Combining React and Websocket to buil...
M.Montalbano/M.Colombo Speroni/S.Sala - Combining React and Websocket to buil...
 
Microservices & API Gateways
Microservices & API Gateways Microservices & API Gateways
Microservices & API Gateways
 
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
Putting The 'M' In MBaaS—Red Hat Mobile Client Development Platform (Jay Balu...
 
API Gateway report
API Gateway reportAPI Gateway report
API Gateway report
 
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
[APIdays Paris 2019] From Microservices to APIs: The API operator in Kubernetes
 
Fuse Online Hands-on Guide
Fuse Online Hands-on GuideFuse Online Hands-on Guide
Fuse Online Hands-on Guide
 
Fuse Online Hands-on Guide
Fuse Online Hands-on GuideFuse Online Hands-on Guide
Fuse Online Hands-on Guide
 
Using an API Gateway for Microservices
Using an API Gateway for MicroservicesUsing an API Gateway for Microservices
Using an API Gateway for Microservices
 
API Gateway study
API Gateway studyAPI Gateway study
API Gateway study
 
INTER-Mediator開発における継続的インテグレーション
INTER-Mediator開発における継続的インテグレーションINTER-Mediator開発における継続的インテグレーション
INTER-Mediator開発における継続的インテグレーション
 
Kong API
Kong APIKong API
Kong API
 
Introduction to Microservices
Introduction to Microservices Introduction to Microservices
Introduction to Microservices
 

Ähnlich wie Deploy and Access WebSphere Liberty and StrongLoop REST Endpoints on IBM Bluemix

Multi-container Applications on OpenShift with Ansible Service Broker
Multi-container Applications on OpenShift with Ansible Service BrokerMulti-container Applications on OpenShift with Ansible Service Broker
Multi-container Applications on OpenShift with Ansible Service Broker
Amazon Web Services
 
Api management update for optus
Api management update for optusApi management update for optus
Api management update for optus
sflynn073
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
Jason452803
 

Ähnlich wie Deploy and Access WebSphere Liberty and StrongLoop REST Endpoints on IBM Bluemix (20)

Revolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere ConnectRevolutionize the API Economy with IBM WebSphere Connect
Revolutionize the API Economy with IBM WebSphere Connect
 
CASCON 2017 - OpenAPI v3
CASCON 2017 - OpenAPI v3CASCON 2017 - OpenAPI v3
CASCON 2017 - OpenAPI v3
 
Multi-container Applications on OpenShift with Ansible Service Broker
Multi-container Applications on OpenShift with Ansible Service BrokerMulti-container Applications on OpenShift with Ansible Service Broker
Multi-container Applications on OpenShift with Ansible Service Broker
 
Going Serverless with OpenWhisk
Going Serverless with OpenWhiskGoing Serverless with OpenWhisk
Going Serverless with OpenWhisk
 
Mobile, Open Source, and the Drive to the Cloud
Mobile, Open Source, and the Drive to the CloudMobile, Open Source, and the Drive to the Cloud
Mobile, Open Source, and the Drive to the Cloud
 
Mobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the CloudMobile, Open Source, & the Drive to the Cloud
Mobile, Open Source, & the Drive to the Cloud
 
Api management update for optus
Api management update for optusApi management update for optus
Api management update for optus
 
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 minsAWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
AWS Community Day Bangkok 2019 - Build a Serverless Web Application in 30 mins
 
RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)RESTful web APIs (build, document, manage)
RESTful web APIs (build, document, manage)
 
The 12 facets of the OpenAPI standard.pdf
The 12 facets of the OpenAPI standard.pdfThe 12 facets of the OpenAPI standard.pdf
The 12 facets of the OpenAPI standard.pdf
 
The 'Serverless' Paradigm, OpenWhisk and FIWARE
The 'Serverless' Paradigm, OpenWhisk and FIWAREThe 'Serverless' Paradigm, OpenWhisk and FIWARE
The 'Serverless' Paradigm, OpenWhisk and FIWARE
 
The Serverless Paradigm, OpenWhisk and FIWARE
The Serverless Paradigm, OpenWhisk and FIWAREThe Serverless Paradigm, OpenWhisk and FIWARE
The Serverless Paradigm, OpenWhisk and FIWARE
 
Building Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco APIBuilding Content-Rich Java Apps in the Cloud with the Alfresco API
Building Content-Rich Java Apps in the Cloud with the Alfresco API
 
WebSphere Connect and API Discovery
WebSphere Connect and API DiscoveryWebSphere Connect and API Discovery
WebSphere Connect and API Discovery
 
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay NagchowdhuryIBM Integration Bus and REST APIs - Sanjay Nagchowdhury
IBM Integration Bus and REST APIs - Sanjay Nagchowdhury
 
REST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptxREST API 20.2 - Appworks Gateway Integration.pptx
REST API 20.2 - Appworks Gateway Integration.pptx
 
M meijer api management - tech-days 2015
M meijer   api management - tech-days 2015M meijer   api management - tech-days 2015
M meijer api management - tech-days 2015
 
Forced Evolution: Shopify's Journey to Kubernetes
Forced Evolution: Shopify's Journey to KubernetesForced Evolution: Shopify's Journey to Kubernetes
Forced Evolution: Shopify's Journey to Kubernetes
 
Apigility-powered API's on IBM i
Apigility-powered API's on IBM iApigility-powered API's on IBM i
Apigility-powered API's on IBM i
 
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
IBM Bluemix and Docker Guest Lecture at Cork Institute of TechnologyIBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
IBM Bluemix and Docker Guest Lecture at Cork Institute of Technology
 

Mehr von Arthur De Magalhaes (9)

Docker 101
Docker 101Docker 101
Docker 101
 
Move existing middleware to the cloud
Move existing middleware to the cloudMove existing middleware to the cloud
Move existing middleware to the cloud
 
WebSphere 20th - Application modernization
WebSphere 20th - Application modernizationWebSphere 20th - Application modernization
WebSphere 20th - Application modernization
 
Exposing auto-generated Swagger 2.0 documents from Liberty!
Exposing auto-generated Swagger 2.0 documents from Liberty!Exposing auto-generated Swagger 2.0 documents from Liberty!
Exposing auto-generated Swagger 2.0 documents from Liberty!
 
REST APIs
REST APIsREST APIs
REST APIs
 
Learn How to Connect Microservices Using the Open API Initiative
Learn How to Connect Microservices Using the Open API InitiativeLearn How to Connect Microservices Using the Open API Initiative
Learn How to Connect Microservices Using the Open API Initiative
 
Design, Auto-Generate and Expose RESTful Microservices Using Open Source and ...
Design, Auto-Generate and Expose RESTful Microservices Using Open Source and ...Design, Auto-Generate and Expose RESTful Microservices Using Open Source and ...
Design, Auto-Generate and Expose RESTful Microservices Using Open Source and ...
 
TechConnect - API Discovery Evolution
TechConnect - API Discovery EvolutionTechConnect - API Discovery Evolution
TechConnect - API Discovery Evolution
 
Think 2018 - MicroProfile OpenAPI
Think 2018  - MicroProfile OpenAPIThink 2018  - MicroProfile OpenAPI
Think 2018 - MicroProfile OpenAPI
 

Kürzlich hochgeladen

%+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
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
%+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
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Kürzlich hochgeladen (20)

%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
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...
 
%+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...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%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 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
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
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
 
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 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...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare%in Harare+277-882-255-28 abortion pills for sale in Harare
%in Harare+277-882-255-28 abortion pills for sale in Harare
 
%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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
%+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...
 
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...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 

Deploy and Access WebSphere Liberty and StrongLoop REST Endpoints on IBM Bluemix

  • 1. Deploy and Access WebSphere Liberty and StrongLoop REST Endpoints on IBM Bluemix Arthur De Magalhaes
  • 2. Presenter Arthur De Magalhaes WebSphere Liberty REST API architect arthurdm@ca.ibm.com
  • 3. Agenda 2 • The API Economy • What is Swagger • StrongLoop • Liberty API Discovery • Demonstration • Feedback
  • 5. API Economy • APIs connect services in the Internet-of-things (IoT). • Businesses provide and consume assets through APIs. • REST APIs are client and server neutral, so often used as the bridge in IoT. • The number of available REST APIs increases daily, but without a standard way of defining, exposing or discovering them. 4
  • 7. Swagger Introduction • Industry leading specification for defining REST APIs. • Supports with both JSON and YAML formats. • Large open source community with various projects on GitHub: • Client code generation (26 languages). • Server code generation (9 languages). • Online editor and GUI. • Over 2000 related open-source repository, with 15000 daily downloads. • Base specification for Open API Initiative (https://openapis.org/), under Linux foundation. 6
  • 8. Swagger YAML Sample 7 paths: /pet: post: tags: - pet summary: Add a new pet to the store description: '' operationId: addPet consumes: - application/json - application/xml produces: - application/xml - application/json parameters: - in: body name: body description: Pet object that needs to be added to the store required: true schema: $ref: '#/definitions/Pet' responses: '405': description: Invalid input security: - petstore_auth: - 'write:pets' - 'read:pets'
  • 10. StrongLoop (an IBM Company) • Leader in enterprise Node.js. • Over 130 npm modules. • Major contributor to Open Source LoopBack and Express. • Design REST APIs from data models. • Top-down from design or from Swagger doc. • Auto-generates Swagger 2.0 • Core member of Node.js Foundation. • Available as part of API Connect’s “Create” license 9
  • 12. Composer 11 • Can create models from DBs or from scratch. • Provides a very nice “top-down” experience.
  • 13. Exploring your API 12 • <app>/explorer • Based on OS Swagger UI • Can test APIs • By default, Swagger available at: <app>/explorer/swagger.json
  • 14. StrongLoop in Bluemix • You can deploy existing StrongLoop applications into Bluemix using Cloud Foundry’s commands: – cd <app-dir> – cf api https://api.ng.bluemix.net – cf login -u <bluemix-userid> -o <bluemix-userid> -s dev – cf push <app-name> • UI: http://<bluemix-host>/explorer • Swagger doc: http://<bluemix-host>/explorer/swagger.json 13
  • 15. StrongLoop Boilerplates 14 • Alternatively, there are 2 boilerplate packages to help you get started.
  • 18. API Economy with Liberty • What are the challenges when using Swagger with Java EE? – Merging Swagger from annotations and standalone docs – UI for rapid API development and unit testing – Exploring all available APIs – Generating code to call external services • Liberty can help with all of these things! 17
  • 19. API Discovery • All applications are discoverable in a single RESTful endpoint, /ibm/api/docs • Query parameter allows filtering based on context root. • Support both JSON and YAML. • Application participation can be configured in server.xml (location, on/off). • Available through apiDiscovery-1.0 feature. 18 Applications Liberty REST Admin UI API Connect
  • 20. API Discovery User Interface • Based on the Open Source Swagger UI. • Available at /ibm/api/explorer. 19
  • 21. API Discovery Collective Support • Enabling apiDiscovery-1.0 on a collective member will expose their aggregated Swagger documentation available. • Endpoints: – /ibm/api/collective/docs – /ibm/api/collective/explorer 20 Admin UI Repository membersREST controller API Connect
  • 22. API Discovery Subscription • POST ibm/api/docs/subscription • Request: { docType: string} • Returns: { feedURL : wss://ibm/api/docs/subscription/websocket/{id}, feedType: websocket } • The client opens WSS connection and receives updates in real-time • Equivalent collective support at /ibm/api/collective/docs/subscription • Works with either webSocket-1.0 or webSocket-1.1 21
  • 23. API Discovery in Bluemix • Push a Liberty package into Bluemix • cf push <yourappname> -p defaultServer • Creates an auto-discoverable container in the cloud. 22 Admin UI app app app WLP API Connect
  • 24. C M M Pulling Liberty Assets from API Connect 23 API Connect Hybrid Liberty + StrongLoop Collective swagger.json
  • 25. Pushing Standalone Assets into API Connect Continuous Integration product.json Source Repository Swagger processor API Connect CLI PUBLIC | DEDICATED | LOCAL API Connectproduct.json + swagger.json Developer
  • 26. Pushing Liberty Assets into API Connect Hybrid Liberty + StrongLoop Collective PUBLIC | DEDICATED | LOCAL API Connect Administrator product.json product.json C M M or product.json + swagger.json Developer Continuous Integration deploy 1 2
  • 27. WebSphere Developer Tools Support • Authoring Swagger document (main doc or stub) through templates and skeleton • Includes JSON and Swagger-based validation. • Auto-generate JAXRS 2.0 client from Swagger document or URL • Can point to a running Liberty instance or Collective Controller and generate a JAXRS client that can connect to any of the exposed services! 26