Commit Graph

8 Commits

Author SHA1 Message Date
Karel Minarik ccbb0e5c97 [UTIL] Fixed an error for the `--output` parameter in `thor api:spec:generate` 2013-12-05 17:36:54 +01:00
Karel Minarik 3a359a1f2a [UTIL] Added a utility to print the list of APIs based on the JSON filenames 2013-06-24 18:13:29 +02:00
Karel Minarik 7bf106ede6 [UTIL] Fixed whitespace in Ruby template for code generator 2013-06-21 16:58:41 +02:00
Karel Minarik c1d2ada564 [UTIL] Set up `params` correctly in the Ruby template
When no params are specified in the spec, set `params` to empty Hash.
2013-06-20 15:13:58 +02:00
Karel Minarik e541dc14a3 [UTIL] Improve the body argument handling in the Ruby template 2013-06-20 15:12:22 +02:00
Karel Minarik 6e3dd51f94 [UTIL] Added support for required body in Ruby template for code generator 2013-06-20 15:06:49 +02:00
Karel Minarik faa0ee14bd [UTIL] Added a source code generator using the JSON API specs
The generator is based on [Thor](https://github.com/wycats/thor),
a library/framework for command line applications.

The generator will read the JSON API spec file(s), and generate
the Ruby source code (one file per API endpoint) with correct
module namespace, method names, and RDoc documentation.

It will generate a test file for each API endpoint as well.

Currently it only generates Ruby source, but can easily be
extended and adapted to generate source code for other
programming languages.

Usage example:

    $ thor api:code:generate ../../api-spec/*.json --force --verbose
2013-06-16 23:25:08 +02:00
Karel Minarik 74837bfe86 [UTIL] Moved the JSON spec generator into the `utils` folder 2013-06-16 17:10:42 +02:00