developing faster with swagger
TRANSCRIPT
Developing faster with Swagger
Tony Tam @fehguy
What is Swagger?
• A simple, structured way to describe your API
• Methods, Resources, Parameters, media types
• Everything your consumers need to know to consume your API
Swagger Example
YAML
ForHumans
Let’s talk Codegen
• We’ve seen code generators before… – WSDL2Java – WADL2Java – W*2*??? – OData Whereare
alltheprojects!???
Toocomplicated!
Hardtocustomize!
Swagger’s got your Back (end)!
And your Front!
All your Plumbing by Swagger!
Workflow
• Client SDKs regenerated, imported with contract change – Common practice for F/E & mobile devs
• Server updated by regeneration – In-place with maven plugin – “merged” with download from online
• …
Plus…
• Let’s rethink DRY Whatiseasierto
maintain???
Introducing Swagger Inflector
• Use Swagger as the Source of Truth for the API – Automatically route to controllers – Automatically map models – Generate Sample Data when controllers not
implemented
https://github.com/swagger-api/swagger-inflector
Show me!
Introducing Swagger Inflector
Swagger Connected
• Swagger is FOSS • Specification + Tools at http://swagger.io • All source at https://github.com/swagger-api • Real-time support at irc.freenode.net
#swagger
Thank you!