Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Burning Bar 📏🔥Join the chat at https://gitter.im/cfr/burningbar Unlicensed Build Status Coverage Status

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.

Usage

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

Spec syntax