Commit 0b2a8073 authored by Boris Kocherov's avatar Boris Kocherov

take into account 'if type absent type can be any'.

so user can choose type if type absent
parent 7984ac56
......@@ -318,7 +318,7 @@
function checkSchemaArrOneChoise(schema_arr) {
if (schema_arr.length === 1) {
if (schema_arr[0].schema === true) {
if (schema_arr[0].schema === true || !schema_arr[0].schema.hasOwnProperty('type')) {
return false;
}
if (schema_arr[0].schema.type instanceof Array) {
......@@ -433,7 +433,7 @@
for (i = 0; i < schema_arr.length; i += 1) {
schema_item = schema_arr[i];
description = schema_item.title;
if (schema_item.schema === true) {
if (schema_item.schema === true || !schema_item.schema.hasOwnProperty('type')) {
generateItemsForAny(schema_item.property_name, schema_item.schema_path);
} else if (getDocumentType(schema_item.schema.type) === "array") {
description = description || schema_item.schema.description;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment