+ All Categories
Home > Technology > Everybody loves Swagger

Everybody loves Swagger

Date post: 16-Apr-2017
Category:
Upload: biztalk360
View: 793 times
Download: 0 times
Share this document with a friend
18
Sponsored & Brought to you by Everybody loves Swagger Massimo Crippa https:// twitter.com/mas_que_crippa https:// be.linkedin.com/in/massimocrippa
Transcript
Page 1: Everybody loves Swagger

Sponsored & Brought to you by

Everybody loves Swagger

Massimo Crippa

https://twitter.com/mas_que_crippa

https://be.linkedin.com/in/massimocrippa

Page 2: Everybody loves Swagger

Nice to meet youMassimo Crippa

Integration Architect at Codit BizTalk D/I Api Management

[email protected]/blog@mas_que_crippalinkedin.com/in/massimocrippa

Page 3: Everybody loves Swagger

AgendaIntroduction

The Swagger project

Integrations

Tools

Page 4: Everybody loves Swagger

Why APIs are trending➔ Open Innovation and New

Markets. Enable firms to use internal as well as external ideas and find new market paths

➔ Consume, Switch or Upgrade Seamlessly. Drive both the API Consumer and Provider towards a continuous improvement of quality

➔ Build on Partner Capabilities➔ Increase Brand Presence

➔ Generate New Revenue Streams

➔ Enable Composite Enterprise Approach where business functionalities become small configurable blocks.

➔ Reduce time-to-market➔ Fueled by mobile, cloud, big

data & IoT

Page 5: Everybody loves Swagger

The successful API➔ Easy to consume (TTFSC, TTFHW)➔ Understand the use, prevent the misuse (Data formats,

authentication, error codes)➔ Upgrade seamlessly➔ Getting started, Multi language code samples, SDKs (DevEx)

The documentation is CRUCIAL

Page 6: Everybody loves Swagger

What is Swagger?

Edit the API specification in YAML to produce the JSON

Editor

Layout, describe and document your API

Specification

A dependency-free collection of HTML / JS / CSS that consumes the swagger.json

UI

Consume the swagger.json to create client and server code

Code-Gen

Page 7: Everybody loves Swagger

The specificationDefinition language to describe and document RESTful API➔ Metadata

➔ info, basepath, consumes, produces, etc..➔ Controllers (paths)

➔ Operations, HTTP verbs, status codes, schema refs➔ Objects Definition (definitions)

➔ Parameters (e.g. skip)➔ Responses➔ Security (e.g. oauth)

Page 8: Everybody loves Swagger

The editorsAPI Specification-First➔ Swagger Editor

➔ editor.swagger.io➔ Editor + swagger.js

➔ apistudio.io➔ Restlet studio (cross-format editor)

➔ studio.restlet.com

Page 9: Everybody loves Swagger

The Swagger UI It’s a dependency-free collection of HTML / JavaScript / CSS➔ List of APIs

➔ description, version, base path➔ Drill-down to the operations

➔ http methods➔ Description, Parameters, Types➔ Try-out the API

Page 10: Everybody loves Swagger

Tools

Page 11: Everybody loves Swagger

Community-driven toolsWhole world of open source tools out there!

Page 12: Everybody loves Swagger

Swashbuckle.NET library to auto-generate the swagger.json➔ ApiExplorer to keep implementation and documentation in-

sync➔ Auto-generate as much as possible + extensibility points

➔ Discoverable (one endpoint per version)➔ Minimal impact to your API

➔ Shashbuckle.core➔ Shashbuckle

➔ Version 5.2.1➔ vNext 6.0.0 beta7

Page 13: Everybody loves Swagger

Integrations

Page 14: Everybody loves Swagger

API Management

Page 15: Everybody loves Swagger

API ManagementAzure API Management service➔ Produces swagger 2.0➔ Consumes 1.2 and 2.0

Sentinet by Nevatech➔ Introduced with the version 4.6 (October 2015)➔ Produces swagger 2.0➔ Consumes 2.0

Page 16: Everybody loves Swagger

Takeaways➔ A good developer experience is crucial to build a successful

API➔ Swagger is the de facto standard to describe modern APIs➔ Swashbuckle: discoverable swagger.json + UI for devs➔ Large number of applications and services that consume

swagger

Page 17: Everybody loves Swagger

References➔ Swagger

http://swagger.io/➔ Swashbuckle

https://github.com/domaindrivendev/Swashbuckle/➔ Microsoft Azure API Management

http://azure.microsoft.com/en-us/services/api-management/➔ Sentinet by Nevatech

http://www.nevatech.com/

Page 18: Everybody loves Swagger

Thank you!


Recommended