grunt-apidoc2swagger
Advanced tools
Comparing version 0.1.9 to 0.1.10
{ | ||
"name": "grunt-apidoc2swagger", | ||
"description": "Convert apidocjs files to Swagger", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"homepage": "https://github.com/Giwi/apiDoc2Swagger", | ||
@@ -6,0 +6,0 @@ "author": { |
@@ -17,3 +17,3 @@ /* | ||
function normalize(obj, key, models) { | ||
grunt.log.ok(key +" -> " +grunt.util.kindOf(obj)); | ||
grunt.log.verbose.ok(key +" -> " +grunt.util.kindOf(obj)); | ||
switch(grunt.util.kindOf(obj)) { | ||
@@ -30,7 +30,6 @@ case "number" : | ||
id : key, | ||
properties : {} | ||
}; | ||
for(var k in obj) { | ||
grunt.log.warn(">>> " + key + "->" +k); | ||
grunt.log.verbose.warn(">>> " + key + "->" +k); | ||
models[key].properties[k] = normalize(obj[k], k, models); | ||
@@ -119,9 +118,6 @@ } | ||
myParam.paramType ="body"; | ||
// myParam.name = "body"; | ||
} | ||
if(api.parameter.examples) { | ||
api.parameter.examples.forEach(function(example) { | ||
grunt.log.warn("Looking for : " + example.title); | ||
if(example.title === myParam.name) { | ||
grunt.log.warn("Found : " + myParam.name); | ||
myParam.type = myParam.name; | ||
@@ -136,3 +132,2 @@ grunt.log.warn(myParam.type); | ||
for(var k in content) { | ||
grunt.log.warn(k); | ||
apiCollection[api.group].models[myParam.type].properties[k] = normalize(content[k], k, apiCollection[api.group].models); | ||
@@ -139,0 +134,0 @@ } |
17176
314