The OpenAPI Spec and Kitura: Getting Started

Get started with the OpenAPI spec in this server-side Swift tutorial on using the Swagger API with Kitura to generate an SDK for your iOS app! By David Okun.

Leave a rating/review
Download materials
Save for later
Share
You are currently viewing page 3 of 3 of this article. Click here to view the first page.

Where to Go From Here?

You can download the finished project for this tutorial using the Download Materials button at the top or bottom of this page.

Hopefully, by now, you can see clearly how powerful and effortless Kitura’s OpenAPI support is. In practice, you’ll likely find this an invaluable tool within your team, especially for testing your API. Over time, you’ll also likely find these tools especially valuable to developers outside your team, as they seek to understand and interact with your API in a platform-neutral, standards-compliant way.

While Kitura provides fantastic tools for exploring and documenting your JSON APIs, it also shields you from working directly with these within your Swift code — via an SDK called KituraKit. You can find out more about KituraKit on its GitHub page.

As you’ll see, this gives you the best of both worlds: Kitura’s amazing OpenAPI support and tools make it super easy for developers of all persuasions to understand your public APIs. At the same time, thanks to KituraKit, you’ll be able to ignore JSON implementation details and focus on clean, native Swift types in your code. It’s a huge win-win!

If you ran into any difficulties along the way, feel free to check out the final projects for this tutorial. (Remember that you’ll need to run swift package generate-xcodeproj in Terminal before working with any starter or final project in Xcode).

If you have any comments or questions about this article, feel free to ask them in the comments below!