tacoss / raml2code

14 stars 4 forks source link

:# Raml to code generator

Build Status

It's a Gulp-plugin so to try

  1. Install gulp

    npm install -G gulp
  2. install the generators you needed

    npm install --save-dev raml2code
    npm install --save-dev raml2code-groovy-pojo
  3. configure the gulpfile.js

    
    var gulp = require('gulp');
    var raml2code = require('raml2code');
    //Install a generators:
    var genDTO = require("raml2code-groovy-pojo");

gulp.task("dtos", function(){ gulp.src('./test/cats.raml') .pipe(raml2code({generator: genDTO, extra: {package:'com.gex'}})) .pipe(gulp.dest('build')); });


4. Run the generator
```bash
  gulp dtos

Generators create and in use by GEX.

If you create a generator let us know to add to this list.

A full example of using using raml2code could be found here:

raml2code-Example

You can make your own generators, DIY

Generator specification

We use the Gradle with the gulp plugin to build and integrate with Java.

gradle

gradle-gulp-plugin