mirror of
https://github.com/LukeHagar/SwagDefGen.git
synced 2025-12-09 12:47:44 +00:00
Fixed type 'array' not being identified as base object
This commit is contained in:
@@ -127,7 +127,11 @@ function convert () {
|
|||||||
// ---- Begin object scope ----
|
// ---- Begin object scope ----
|
||||||
outSwagger += indentator + '"' + obj + '": {'
|
outSwagger += indentator + '"' + obj + '": {'
|
||||||
changeIndentation(tabCount+1);
|
changeIndentation(tabCount+1);
|
||||||
|
if (Object.prototype.toString.call(inJSON[obj]) === '[object Array]') {
|
||||||
|
convertArray(inJSON[obj][0], obj);
|
||||||
|
} else {
|
||||||
convertObject(inJSON[obj], obj);
|
convertObject(inJSON[obj], obj);
|
||||||
|
}
|
||||||
// ---- End object scope ----
|
// ---- End object scope ----
|
||||||
changeIndentation(tabCount-1);
|
changeIndentation(tabCount-1);
|
||||||
outSwagger += indentator + '},';
|
outSwagger += indentator + '},';
|
||||||
|
|||||||
Reference in New Issue
Block a user