diff --git a/lib/components/JsonSchema/json-schema.html b/lib/components/JsonSchema/json-schema.html
index bd3155ee..d1377c59 100644
--- a/lib/components/JsonSchema/json-schema.html
+++ b/lib/components/JsonSchema/json-schema.html
@@ -9,7 +9,7 @@
- {{_displayType}}
+
@@ -38,7 +38,8 @@
|
-
+
|
diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js
index 331eb9d7..4434b935 100644
--- a/lib/components/JsonSchema/json-schema.js
+++ b/lib/components/JsonSchema/json-schema.js
@@ -11,7 +11,7 @@ import JsonPointer from '../../utils/JsonPointer';
templateUrl: './lib/components/JsonSchema/json-schema.html',
styleUrls: ['./lib/components/JsonSchema/json-schema.css'],
directives: [JsonSchema, Tabs, Tab],
- inputs: ['isArray', 'final']
+ inputs: ['isArray', 'final', 'nestOdd']
})
@Reflect.metadata('parameters', [[SchemaManager], [ElementRef]])
export default class JsonSchema extends BaseComponent {
@@ -161,7 +161,7 @@ const injectors = {
simpleType: {
check: (propertySchema) => {
if (propertySchema.type === 'object') {
- return !propertySchema.properties;
+ return !propertySchema.properties || !Object.keys(propertySchema.properties).length;
}
return (propertySchema.type !== 'array') && propertySchema.type;
},
diff --git a/lib/components/JsonSchema/json-schema.scss b/lib/components/JsonSchema/json-schema.scss
index 5f572b5b..e32c0628 100644
--- a/lib/components/JsonSchema/json-schema.scss
+++ b/lib/components/JsonSchema/json-schema.scss
@@ -20,7 +20,7 @@ $array-marker-line-height: 1.5;
}
json-schema.nested-schema {
- background-color: $side-menu-active-bg-color;
+ background-color: white;
padding: 10px 20px;
position: relative;
border-radius: $border-radius;
@@ -35,7 +35,7 @@ json-schema.nested-schema {
border-color: transparent;
border-width: 10px 15px 0;
margin-left: -7.5px;
- border-top-color: white;
+ border-top-color: $side-menu-active-bg-color;
}
&:before {
left: 10%;
@@ -46,7 +46,20 @@ json-schema.nested-schema {
}
.param:first-of-type > .param-name:before, .param:last-of-type > .param-name:after {
- border-color: #f1f1f1;
+ border-color: white;
+ }
+}
+
+json-schema[nesteven="true"] {
+ background-color: $side-menu-active-bg-color;
+ border-radius: $border-radius;
+
+ &:before, &:after {
+ border-top-color: white;
+ }
+
+ > .params-wrap > .param:first-of-type > .param-name:before, > .params-wrap > .param:last-of-type > .param-name:after {
+ border-color: $side-menu-active-bg-color;
}
}