+1
-7
@@ -13,5 +13,3 @@ var through = require('through2'); | ||
| var raml = require('raml-parser'); | ||
| var cwd = process.cwd(); | ||
| var nwd = path.resolve(path.dirname(fileName.path)); | ||
| process.chdir(nwd); | ||
| raml.loadFile(fileName.path).then(function (data) { | ||
@@ -24,4 +22,2 @@ if (options && options.generator) { | ||
| var fileG = new gutil.File({ | ||
| base: "", | ||
| cwd: "", | ||
| path: element.name, | ||
@@ -42,3 +38,2 @@ contents: new Buffer(element.content) | ||
| } | ||
| process.chdir(cwd); | ||
| callback(); | ||
@@ -48,3 +43,2 @@ }, function (error) { | ||
| self.emit('error', new PluginError(PLUGIN_NAME, error)); | ||
| process.chdir(cwd); | ||
| callback(); | ||
@@ -51,0 +45,0 @@ }); |
@@ -5,2 +5,4 @@ package {{extra.package}} | ||
| import javax.ws.rs.POST | ||
| import javax.ws.rs.PUT | ||
| import javax.ws.rs.DELETE | ||
| import javax.ws.rs.Path | ||
@@ -13,8 +15,4 @@ import javax.ws.rs.PathParam | ||
| import javax.ws.rs.core.UriInfo | ||
| {{#if extra.importPojos}}import {{extra.importPojos}}.*{{/if}} | ||
| {{#if extra.importPojos}} | ||
| import {{extra.importPojos}}.*; | ||
| {{/if}} | ||
| @Path("{{{uri}}}") | ||
@@ -21,0 +19,0 @@ public interface {{className}} { |
+1
-1
| { | ||
| "name": "raml2code", | ||
| "version": "0.0.5", | ||
| "version": "0.0.6", | ||
| "description": "Raml spec to code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,2 +5,4 @@ package {{extra.package}} | ||
| import javax.ws.rs.POST | ||
| import javax.ws.rs.PUT | ||
| import javax.ws.rs.DELETE | ||
| import javax.ws.rs.Path | ||
@@ -13,8 +15,4 @@ import javax.ws.rs.PathParam | ||
| import javax.ws.rs.core.UriInfo | ||
| {{#if extra.importPojos}}import {{extra.importPojos}}.*{{/if}} | ||
| {{#if extra.importPojos}} | ||
| import {{extra.importPojos}}.*; | ||
| {{/if}} | ||
| @Path("{{{uri}}}") | ||
@@ -21,0 +19,0 @@ public interface {{className}} { |
@@ -5,2 +5,4 @@ package org.gex | ||
| import javax.ws.rs.POST | ||
| import javax.ws.rs.PUT | ||
| import javax.ws.rs.DELETE | ||
| import javax.ws.rs.Path | ||
@@ -15,3 +17,2 @@ import javax.ws.rs.PathParam | ||
| @Path("/cats") | ||
@@ -18,0 +19,0 @@ public interface GatitosResource { |
@@ -32,3 +32,3 @@ var raml2code =require('../..'); | ||
| //console.log(content); | ||
| //console.log("=======") | ||
| //console.log("======="); | ||
| if(file.path == 'GatitosResource.groovy'){ | ||
@@ -35,0 +35,0 @@ wrapAssertion(function () { |
33708
-0.19%587
-1.18%