Fixed type 'array' not being identified as base object

This commit is contained in:
RogerBernardo
2017-02-03 09:02:33 -02:00
parent 2afe6a81d5
commit 8ce2f1c7e9

View File

@@ -127,7 +127,11 @@ function convert () {
// ---- Begin object scope ----
outSwagger += indentator + '"' + obj + '": {'
changeIndentation(tabCount+1);
if (Object.prototype.toString.call(inJSON[obj]) === '[object Array]') {
convertArray(inJSON[obj][0], obj);
} else {
convertObject(inJSON[obj], obj);
}
// ---- End object scope ----
changeIndentation(tabCount-1);
outSwagger += indentator + '},';