Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Human and Machine Discoverable REST APIs is the next!

Human and Machine Discoverable REST APIs is the next!

REST APIs are a fresh air in the post-SOAP era but the lack of discoverability is a pain in the neck. If you were looking for something like the good-old WSDL for your REST APIs, we have more than that. Through the OpenAPI Initiative let's discuss how Swagger can provide language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection. It's similar to what interfaces have done for lower-level programming, but this time for REST APIs.

Daron Yondem

May 07, 2016
Tweet

More Decks by Daron Yondem

Other Decks in Programming

Transcript

  1. Human and Machine
    Discoverable REST APIs is the
    next!
    DARON YÖNDEM
    CTO, XOMNI
    @DARONYONDEM

    View Slide

  2. Kimsin sen?

    View Slide

  3. REST API’lar için SSIS/DTS
    tadında bir şey var mı?

    View Slide

  4. SOAP, WSDL, RPC
    ÖZLÜYOR MUYUZ?

    View Slide

  5. YAML – Yet Another Markup Language
    • YAML is a human friendly data serialization standard for all
    programming languages.
    # Ranking of 1998 home runs
    ---
    - Mark McGwire
    - Sammy Sosa
    - Ken Griffey
    # Team ranking
    ---
    - Chicago Cubs
    - St Louis Cardinals

    View Slide

  6. YAML ile API Design

    View Slide

  7. View Slide

  8. View Slide

  9. View Slide

  10. Swagger Editor Demo
    HTTP://EDITOR.SWAGGER.IO/

    View Slide

  11. Swagger CodeGen
    HTTP://PETSTORE.SWAGGER.IO/

    View Slide

  12. CodeGen As-A-Service
    HTTP://GENERATOR.SWAGGER.IO

    View Slide

  13. AutoRest
    HTTPS://GITHUB.COM/AZURE/AUTOREST

    View Slide

  14. Swagger UI Demo
    HTTP://PETSTORE.SWAGGER.IO/

    View Slide

  15. Kimler kullanıyor / destekliyor?
    • Amazon : API Gateway Importer https://github.com/awslabs/aws-
    apigateway-importer
    • Azure API Management https://azure.microsoft.com/en-
    us/documentation/articles/api-management-howto-import-api/
    • ApiGee SmartDocs

    View Slide

  16. RAML – Alternatif
    • YAML tabanlı : http://raml.org/
    • Swagger to RAML https://github.com/8x8Cloud/swagger2raml
    • RAML’dan Doküman Üretmen
    https://github.com/raml2html/raml2html
    • Önce tasarla sonra yaz yöntemi için SWAGGER’dan daha uygun
    olabilir.

    View Slide

  17. Kaynaklar / Linkler
    • Swagger UI : https://github.com/swagger-api/swagger-ui
    • Swagger Editor : https://github.com/swagger-api/swagger-editor
    • Swagger Codegen : https://github.com/swagger-api/swagger-
    codegen
    • AutoRest : https://github.com/Azure/autorest

    View Slide

  18. TEŞEKKÜRLER
    @DARONYONDEM

    View Slide