Presented by - Raghavan “Rags” Srinivas, Architect, IBM
Enabling other developers and organizations to use your APIs through their own applications and services provides a compelling system for innovation and monetization. The Swagger spec (v2.0), recently donated to the Open API Initiative (OAI), is part of an open source project for better creation and documentation of APIs. Companies are empowering developers via these initiatives to leverage the data and build apps around it. This hands-on session helps you get started with creating APIs for consumption by developers in a well-documented, secure, and easy-to-manage form.
3. AGENDA (WITH LOTS OF DEMOS STREWN IN)
➤ API Economy
➤ What is Swagger?
➤ What is Loopback?
➤ What in the heck is IBM API Connect?
➤ How can I get it?
➤ How can I use it?
➤ Where do I learn more and ask for help?
5. THE FIRST THING AN API DOES IS
ALLOW [A STARTUP] TO CREATE A
PARTNERED ECOSYSTEM THAT IS
TECHNOLOGY DRIVEN
Sean O’Neal - Adaptly
APIS - A DIGITAL TRANSFORMATION
6. NODE IS FOR APIS
➤ Based on Google’s highly performant v8
engine
➤ Small memory footprint
➤ E2e Asynchronous i/o out of the box
➤ Modular, composable and rich ecosystem
➤ Large scale microservice creation
➤ Lightweight, developer friendly,
heightened productivity
7. WHAT ATTRACTED DEVELOPERS/COMPANIES TO THE SWAGGER
PROJECT?
• A common, public contract
between services
• Independent of language,
framework, deployment
technology
YAML or JSON format
• Supports both API-first and
code-first approaches to
defining, building and
documenting APIs
• Broad industry/developer
adoption
8. SWAGGER PROJECT BACKGROUND
• Swagger Project founded in 2010
by Tony Tam / Reverb to design and
document API interfaces
• Groups large & small drawn to
Project Interested in its simplicity,
pragmatic approach, potential open
governance
• Acquired by SmartBear in early
2015
• Decision to form a Linux
Foundation Working Group Project
in late 2015
• Swagger Spec donated by
SmartBear Software to the Open API
Initiative
12. ➤ LB is an open source Node.js framework
built on top of Express
➤ Optimized for building REST based APIs
for mobile, web, and other devices.
➤ Create and consume APIs quickly
following best practices.
➤ Model-based approach
➤ Provides OOB solutions for DRY tasks yet
highly extensible.
➤ http://loopback.io
LOOPBACK
13. LOOPBACK &
➤ StrongLoop was a member of Swagger 2.0 WG and we
continue to drive towards v3.0
➤ Both Swagger 1.0 & 2.0 are supported in LoopBack since
inception
➤ LB Apps can also be generated directly from swagger specs
using the cli
➤ LB & APIC API explorer UIs are Swagger based
➤ Working closely with the OpenAPI Initiative to further
advance and promote open APIs.
14. ANATOMY OF A LOOPBACK APP
➤ Models are at the heart of LoopBack, and represent back-end
data sources
➤ Models automatically come with a predefined REST API
with a full set of CRUD
15. GENERATING MODELS
➤ Models can be generated in many ways
➤ LB Model/App generator based on the Yeoman generator
➤ Model Discovery from an existing relational database
➤ By instance introspection for free-form data
➤ Ex: NoSQL or REST
➤ Models are generated in a JSON file, which can then be
further customized
➤ Swagger specs are generated from model metadata
16.
17. CREATE
➤ You can create APIs via the UI or CLI
➤ You can import existing APIs
➤ You can mashup APIs
18. RUN
➤ Ability to test APIs
➤ Language help provided (Node, PHP, Curl, and more)
19. MANAGE
➤ Take a set of APIs and define a "product"
➤ Create and manage a complete developer portal (docs +
testing)
➤ Deep analytics (what APIs are being used and how often)
20. SECURE
➤ Define how people login
➤ Define when they must login
➤ Set up rate limits
21. PRE-REQ
➤ Install npm (Node Package Manager)
➤ Easiest way is to install Node
➤ At command prompt/terminal, type npm
23. DEMO
➤ Create a new application
➤ Launch the API Designer
➤ Test the API
➤ Add our own API
➤ Create + Run
24. FYI - BLUEMIX
➤ Platform as a Service solution
➤ Does lots and lots and lots of stuff (my marketing, not IBM)
➤ https://console.ng.bluemix.net/registration/
31. GET INVOLVED WITH THE OAI COMMUNITY
Join the technical community and engage with projects!
➤ Get involved in creating the next version of the OpenAPI Spec
➤ https://openapis.org/news/blogs/2016/07/you-can-get-involved-creating-
openapi-specification-and-heres-how
➤ IRC: #openapis at irc.freenode.net
➤ Twitter: @OpenApiSpec
➤ GitHub
➤ https://github.com/OAI/OpenAPI-Specification URL
• https://github.com/OAI/OpenAPI-Specification/tree/OpenAPI.next
• https://github.com/swagger-api
What role would you/your company like to play in the OAI?
➤ https://openapis.org/join