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

Generating Swift Code with the OpenAPI Spec

David Okun
September 30, 2017

Generating Swift Code with the OpenAPI Spec

My talk at Swift Cloud Workshop 2 about generating Swift SDKs based on a Web API Specification

David Okun

September 30, 2017
Tweet

More Decks by David Okun

Other Decks in Programming

Transcript

  1. Generating Swift Code Using the
    OpenAPI Spec
    By David Okun
    @dokun24

    View Slide

  2. What we'll cover today
    • Wait, why is he talking about Node.js?
    • Oh, you can do that in Swift too?
    • WHY U DO DIS
    • HOW U DO DIS
    • References

    View Slide

  3. LoopBack
    Generate a Web API from the command line

    View Slide

  4. LoopBack
    Generate a Web API from the command line
    Ya, rly.

    View Slide

  5. The Open API Spec
    An easy way to define a Web API with one file

    View Slide

  6. The Open API Spec
    An easy way to define a Web API with one file
    Yes, even a Swift Web API.

    View Slide

  7. View Slide

  8. npm install -g loopback-cli

    View Slide

  9. lb

    View Slide

  10. lb model

    View Slide

  11. lb export-api-def

    View Slide

  12. bx plugin install sdk-gen -r Bluemix

    View Slide

  13. bx sdk generate --swift -f ./Definition.yml

    View Slide

  14. bx dev create

    View Slide

  15. DEMO TIME

    View Slide

  16. The Slide You Want A Photo Of
    • https://strongloop.com/strongblog/generate-client-sdk-
    loopback-bluemix-cli
    • https://console.bluemix.net/docs/cli/index.html
    • https://github.com/swagger-api/swagger-codegen
    • https://console.bluemix.net/docs/cloudnative/
    dev_cli.html#developercli

    View Slide

  17. Absolutely Shameless Self Promotion
    • https://github.com/IBM/loopback-in-five
    • https://github.com/dokun1/Lumina
    • @dokun24

    View Slide

  18. !

    View Slide