Skip to content

Commit 1a08e63

Browse files
author
Jakub Jankowski
authored
fix: array of objects with no type (#36)
1 parent dd89bc4 commit 1a08e63

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/utils/renderSchema.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ export const renderSchema: Walker = function*(schema, level = 0, meta = { path:
7777
...meta,
7878
...(parsedSchema.items !== undefined &&
7979
!Array.isArray(parsedSchema.items) && {
80-
subtype: '$ref' in parsedSchema.items ? `$ref( ${parsedSchema.items.$ref} )` : parsedSchema.items.type,
80+
subtype:
81+
'$ref' in parsedSchema.items
82+
? `$ref( ${parsedSchema.items.$ref} )`
83+
: parsedSchema.items.type ||
84+
(parsedSchema.items.properties && 'object') ||
85+
(parsedSchema.items.items && 'array'),
8186
}),
8287
path,
8388
},

0 commit comments

Comments
 (0)