Latest 1.0.1
License MIT
Platforms ios 9.0, osx 10.11
Dependencies APIKit, URITemplate

Swift client generator for API Blueprint

Input file is an API Blueprint AST file generated by drafter.
Output is a Swift client code (with some dependencies: APIKit, Himotoki, etc)


see Examples

Real World Examples

banjun/imastodon Mastodon API



% swift build

release (SwiftBeaker/releases)

% swift build -c release -Xswiftc -static-stdlib


% drafter -f json > apib.json # generate AST using drafter
% SwiftBeaker apib.json > APIClient.swift

for use in a framework target for the API:

% SwiftBeaker --public apib.json > APIClient.swift # public memberwise init & public members


SwiftBeaker converts …

  • each Transitions into a APIKit.Request
  • each Responses bound to a Request into a enum Responses whose cases identified by a pair of status code and content type
  • each Data Structures (named and anonymous) into a Himotoki.Decodable struct

Latest podspec

    "name": "SwiftBeaker",
    "version": "1.0.1",
    "summary": "Swift client generator for API Blueprint",
    "description": "SwiftBeaker is a Swift client generator for API Blueprint.nthe pod depends on runtime dependencies that generated client depends on.",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "banjun": "[email protected]"
    "source": {
        "git": "",
        "tag": "1.0.1"
    "social_media_url": "",
    "platforms": {
        "ios": "9.0",
        "osx": "10.11"
    "source_files": "Pod/Classes/**/*.swift",
    "dependencies": {
        "APIKit": [],
        "URITemplate": []
    "pushed_with_swift_version": "3.1"

Pin It on Pinterest

Share This