@@ -1,2 +0,2 @@ | ||
| var capitalize, commonHelpers, dirname, fs, generator, path, template, util; | ||
| var capitalize, commonHelpers, dirname, fs, generator, path, sanitize, template, util; | ||
@@ -25,2 +25,12 @@ fs = require('fs'); | ||
| sanitize = function(str) { | ||
| var aux, res; | ||
| aux = str.split("."); | ||
| res = ''; | ||
| aux.forEach(function(it) { | ||
| return res += capitalize(it); | ||
| }); | ||
| return res; | ||
| }; | ||
| generator.parser = function(datos) { | ||
@@ -54,3 +64,3 @@ var data, key, model, p, parsed, ref, row, schemaName, _i, _len, _ref, _ref1; | ||
| parsed.push({ | ||
| name: capitalize("" + schemaName + ".groovy"), | ||
| name: capitalize("" + (sanitize(schemaName)) + ".groovy"), | ||
| model: model | ||
@@ -57,0 +67,0 @@ }); |
+1
-1
| { | ||
| "name": "raml2code", | ||
| "version": "0.0.8", | ||
| "version": "0.0.9", | ||
| "description": "Raml spec to code", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -15,2 +15,9 @@ fs = require('fs') | ||
| sanitize = (str)-> | ||
| aux = str.split(".") | ||
| res = '' | ||
| aux.forEach (it)-> | ||
| res += capitalize(it) | ||
| res | ||
| generator.parser = (datos) -> | ||
@@ -34,3 +41,3 @@ parsed = [] | ||
| model.extra = datos.extra if datos.extra | ||
| parsed.push {name: capitalize("#{schemaName}.groovy") , model} | ||
| parsed.push {name: capitalize("#{sanitize(schemaName)}.groovy") , model} | ||
| parsed | ||
@@ -37,0 +44,0 @@ |
Sorry, the diff of this file is not supported yet
33937
1.04%634
1.44%