emocon 2015 - hal with swagger

Post on 14-Jan-2017

422 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Response Deserialisationby Swagger with HAL

https://doc.co/u18YLp

Justin Yoo• Development Consultant at Kloud Solutions• Microsoft MVP• http://aliencube.org• http://devkimchi.com• @justinchronicle

Disclaimer• Contents in this slide:• Are ONLY my personal opinion• MAY be different from my company’s opinion

• Sample codes used in the demo:• CAN be used or distributed under the MIT licence• MAY contain defects• MAY NOT be suitable for production use

Agenda• HAL (Hypertext Application Language)• HAL Demo• Swagger• Swagger Demo• AutoRest• AutoRest Demo• Q&A

HAL

What is HAL?• Hypertext Application Language• Richardson Maturity Model• Layer 3: Hypermedia Control

• Returning resource with metadata• Metadata contains information

what to do next

http://martinfowler.com/articles/richardsonMaturityModel.html

HAL Implementations• IETF Draft• https://tools.ietf.org/html/draft-kelly-json-hal

• List of public hypermedia APIs using HAL• Amazon AppStream• Oxford University

• HAL libraries• Java, C#• PHP, Python, Ruby• JavaScript, Swift, Obj-C• etc…

Sample Code

Swagger

What is Swagger?• http://swagger.io• Standard interface to REST APIs• Better discoverability• for humans• for machines

• Better understandability• without reading source codes

• Client SDK generation

Swagger Implementations• Java• Springfox

• JavaScript• Swagger Parser

• C#• Swashbuckle• AutoRest

• And more…• http://swagger.io/open-source-integrations

Swagger Sample Screen

Swagger.json

AutoRest

What is AutoRest?• Backed by Microsoft• Generating client libraries from JSON schema generated by Swagger• Supporting client libraries• C#• Java• JavaScript• Ruby

Q & A

top related