Migrated code from https://github.com/surtich/RESTgen to https://github.com/thegameofcode/candle