diff --git a/lib/components/JsonSchema/json-schema-common.scss b/lib/components/JsonSchema/json-schema-common.scss index e3e7ce97..1c13d370 100644 --- a/lib/components/JsonSchema/json-schema-common.scss +++ b/lib/components/JsonSchema/json-schema-common.scss @@ -101,13 +101,10 @@ $sub-schema-offset: ($bullet-size/2) + $bullet-margin; } .param-type.with-hint { - &:before, &:after { - content: "\\00a0"; - } - background-color: rgba(0, 50, 159, 0.1); - padding: 0.2em 0; - font-size: 0.85em; - border-radius: 3px; + display: inline-block; + margin-bottom: 0.4em; + border-bottom: 1px dotted rgba(38,50,56,0.4); + padding: 0; cursor: help; } diff --git a/lib/components/JsonSchema/json-schema.js b/lib/components/JsonSchema/json-schema.js index fcb9acb8..8faaa8f7 100644 --- a/lib/components/JsonSchema/json-schema.js +++ b/lib/components/JsonSchema/json-schema.js @@ -66,7 +66,6 @@ export default class JsonSchema extends BaseComponent { if (!schema.properties) { this.isTrivial = true; this._displayType = schema.type; - this._displayTypeHint = 'This field may contain data of any type'; return; } @@ -108,13 +107,13 @@ export default class JsonSchema extends BaseComponent { propData.format = itemFormat; propData._isArray = true; propData.type = 'array ' + propData.items.type; - } else if (propData.type === 'object') { + } else if (propData.type === 'object' && propData.properties) { propData._displayType = propData.title || 'object'; } else if (!propData.type) { propData._displayType = '< * >'; propData._displayTypeHint = 'This field may contain data of any type'; } else { - // here we are sure that property has simple type + // here we are sure that property has simple type (integer, string, object withou properties) // delete pointer for simple types to not show it as subschema if (propData._pointer) { propData._pointer = undefined; diff --git a/package.json b/package.json index a20844cc..87ac4913 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "redoc", "description": "Swagger-generated API Reference Documentation", - "version": "0.6.5", + "version": "0.6.6", "repository": { "type": "git", "url": "git://github.com/Rebilly/ReDoc" @@ -56,7 +56,7 @@ "devDependencies": { "babel-eslint": "^4.1.6", "babel-polyfill": "^6.3.14", - "branch-release": "^0.3.1", + "branch-release": "^0.3.2", "browser-sync": "^2.10.1", "del": "^2.2.0", "deploy-to-gh-pages": "^1.0.0",