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
debug
% swift build
release (SwiftBeaker/releases)
% swift build -c release
% drafter -f json api-blueprint-document.md > apib.json # generate AST using drafter (ver. 5)
% 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
Codable
struct