Swagger introduction - the - whys
Transcript of Swagger introduction - the - whys
GiovanniandJus,nonSwaggerandRAMLMikefromFlockDataonmicroservicesexperiencePizzaGetoutofhere
AucklandAPIandMicroservicesMeetup
I
3rdmee,ng
IBMteam
Recep,onist
Security
Firewarden
Janitor
Safetybriefing• listofeveryone• attheendalloftheguestshavetoleave• healthandsafetyandemergency• bathroomsandtheemergencyexits• leavethemee,ngroomina,dystate• alcoholmustbemanagedresponsibly
Introduc)on to SWAGGER (the whys)
GiovanniVigorelliIBMmiddleware
Howonepresentshimorherselftotheworld.Swaggerisshownfromhowthepersonhandlesasitua,on.Itcanalsobeshownintheperson'swalk.
hMp://www.urbandic,onary.com/define.php?term=swagger
Canwestartwithoutadefini,on?
Aperson'sstyle-theywaytheywalk,talk,dress.I'mlovinghisswagger!
It’sallaboutmakingthemselvesvisible
RESTWebAPIislikebrowsingawebsitewithyoureyesclosed!
Inthe‘olddays’orin‘theotherroom’there’sWSDL(SOAPwebservices),complexanduglyasyoulike,butupforthejob
Whichproblemsittries(successfully)tosolve
APIdiscovery
APIreadability
Developmentspeedup-clientandserversidedecoupling-crea,ngRESTAPIfromyourcode-generatecodefromAPI
RemovebarriersbetweenBusiness(productowners)andIT(developers)
Swagger.json
APIdiscovery(defini,on)
swagger
info
host
basePath
schemes
consumes
produces
paths
defini,ons (…orYAML)
SwaggerUIhelpstodefineastandardforRESTAPIdocumenta,on.Nomoredocumenta,oncowboys!
APIreadability(documenta,on)
APIdefini,onallowsclientsidedeveloperstocreateclientagainstswaggerdefini,on(codgenortest)
APIdefini,onallowsserversidedevelopersimplementthelogictoserverAPIresources
Dev.speedup–clientandserverdecoupling
BusinessServicesMobile,Web,whateverApps
Swagger.json
Devspeedup–codegenera,on
SwaggerTools
SwaggerJS
SwaggerCodegen
Dev.speedup–APIgenera,on
JAX-RS
RemoveBusiness–Developmentbarriers
TopDownBoMomupIden,fy
commercialproducts
DesigntheAPI
ImplementtheAPIlogic
LeverageITlegacy
LeverageITlegacy
ExternalizeITassets
Marke,ngaproduct
100%opensource,lovedbybigplayers
SwaggerapiRAMLapi Blueprintapi
3players…
…1winner!(ifitwasarace)
hMp://www.miramax.com/subscript/pulp-fic,on-celebra,ng-20-years/
Imagescredit:
hMps://en.wikipedia.org/wiki/Night_vision_device
hMp://swagger.io
hMps://maxpreme.wordpress.com/2008/12/08/the-north-face-x-swagger/
hMps://www.google.co.nz/trends/
hMp://www.telestar.fr/2014/photos/zach-galifianakis-l-incroyable-perte-de-poids-de-l-acteur-de-very-bad-trip-diaporama-49531
hMp://mic.com/ar,cles/77505/why-everyone-is-so-mad-about-the-wolf-of-wall-street#.GL46BT50a