Swift RPC generator.
Available online with simple spec editor and output viewer.
Clone and run:
$ git clone https://github.com/cfr/burningbar.git
$ cd burningbar
$ make example
See INSTALL for general installation and Xcode integration instruction.
Command
$ burningbar --spec-file spec.bb
reads spec.bb and generates Interface.swift (RPC funcs) and
Entities.swift (structs/mappers), Interface class is parameterized by
Transport
protocol containing call
, cast
, listen
, cancel
funcs and
CancellationToken
typealias. Struct's init?(json:)
takes [String: AnyObject]
representing JSON object, json
returns this object back.
See help for more options:
$ burningbar --help
burningbar: Usage: burningbar [-vhtirdsbpc]
http://j.mp/burnbar v0.6.1-α
-v --version print version number
-h --help print help
-t Transport --transport=Transport transport protocol name
-i Iterface --interface=Iterface interface class name
-r Interface.swift --interface-file=Interface.swift interface out filename
-d Entities.swift --entities-file=Entities.swift entities out filename
-s spec.bb --spec-file=spec.bb input spec file
-b --dynamicity-shield accept weak-typed json
-p . --path=. output path prefix
-c --validate validate spec, exit on error