From 6965e69c8cf9c9636b0a784627827bacd5328e82 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Sun, 13 Mar 2016 02:32:47 +0200 Subject: [PATCH] fix regression --- lib/components/JsonSchema/json-schema.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js index deadfe7e..8faaa8f7 100644 --- a/lib/components/JsonSchema/json-schema.js +++ b/lib/components/JsonSchema/json-schema.js @@ -63,6 +63,12 @@ export default class JsonSchema extends BaseComponent { this.componentSchema.required.forEach(prop => this.requiredMap[prop] = true); } + if (!schema.properties) { + this.isTrivial = true; + this._displayType = schema.type; + return; + } + let discriminatorFieldIdx = -1; let props = Object.keys(schema.properties).map((prop, idx) => { let propData = schema.properties[prop];